General Community > Scripting Help
Get user name from SMF cookie on My Website build with SSI
Arantor:
Firstly, it means you're not having to dig around getting ids, and if you later create a new group that is a form of global moderator, it'll just work here too, rather than having to figure it out then as to why it isn't working.
Anything you write you should expect to have to change in 6 months, just in case.
Labradoodle-360:
Yeah, you're correct. But using the group ids wouldn't be a horrible solution. Using allowedTo(); would be more flexible.
ZoRk:
I already made it with $user_info['groups'] Work fine. :)
How can y do with allowedTo('moderate_forum') ? I'm curious...
The syntax to use i mean, i'm just using PHP/SQL for couple of weeks so...I'm bad... :-\
Ps: What the hell makes custom_profile field's datas in the smf-theme table :o? Took me 15 minutes to find it...
Labradoodle-360:
allowedTo('permission_name'); is the syntax, it's a function that returns a boolean (true | false) on whether the user can perform that operation or has that permission.
http://support.simplemachines.org/function_db/index.php?action=view_function;id=408
the isAllowedTo(); function is identical, although it is fatal rather than returning a bool.
CapadY:
--- Quote from: ZoRk on May 07, 2012, 07:23:40 PM ---Where can i found all the array fields for $user_info ?
--- End quote ---
Try this:
print_r($user_info);
;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version