Announcement

Collapse
No announcement yet.

userinfo

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jake Bunce
    replied
    Yes, it's an extra query with either method.

    Leave a comment:


  • DarkDelight.net
    replied
    Thanks to both of you.

    I wanted to get a permission based off the userid of posts.

    Will doing it this way add another query for every post on every page?

    Leave a comment:


  • Freddie Bingham
    replied
    $userinfo = fetch_userinfo($userid);

    Then access $userinfo['usergroupid' and $userinfo['membergroupids']

    I suggest not using this in a loop though.

    Leave a comment:


  • Jake Bunce
    replied
    I don't think there is a separate function for that. Or at least I can't find it.

    This code will get the information you want:

    Code:
    $userinfo = $DB_site->query_first("SELECT userid, usergroupid, membergroupids FROM " . TABLE_PREFIX . "user WHERE userid = [color=red]X[/color]");
    Where X is the userid of the user.

    Now $userinfo will contain the user's userid, usergroupid, and membergroupids:

    $userinfo[userid]
    $userinfo[usergroupid]
    $userinfo[membergroupids]

    Leave a comment:


  • DarkDelight.net
    started a topic userinfo

    userinfo

    I have a userid and I need to know the usergroupid and membergroupids.

    Is there a function that I can pass the userid and it will return userinfo?

    Thanks
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X