ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Converting user name to cat_id

October 14, 2010 1:28pm

Subscribe [1]
  • #1 / Oct 14, 2010 1:28pm

    scottb

    348 posts

    Moderator’s note: Moved to the CodeShare Corner

    This question may be related to a resolved thread.

    I have a group of users who need to submit content on a variation of an SAEF page. Their user names are the same as the category names I’ve assigned to this weblog.

    They can’t view the category list for security reasons. So the category menu is hidden and must contain a cat_id based on their login.

    In order to submit their content to the correct category, I need to convert username to cat_name to cat_id, as discussed in the posting aboved. My very limited php has produced variations of this at the top of the form page:

    <?php
    $username = "{username}";
    $cat_name = "{cat_name}";
    $cat_id = "{cat_id}";
    
    $username = $cat_name;
    $cat_name = $cat_id;
    ?>

    Where I’m trying to convert username to cat_name and then to cat_id. You php experts will probably see right away that it’s wrong. Any advice please?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases