MyBB Community Forums
is there a MyBB Internal Variables for registred user ? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: is there a MyBB Internal Variables for registred user ? (/thread-138023.html)



is there a MyBB Internal Variables for registred user ? - sharingamak - 2013-04-21

Hello ;
Is there a MyBB Internal Variables for registred user ?

like this
usergroup['cancp']



RE: is there a MyBB Internal Variables for registred user ? - Jones H - 2013-04-21

You can check $mybb->user['uid']


RE: is there a MyBB Internal Variables for registred user ? - Destroy666 - 2013-04-21

You'd like to check if user is registered? You need to use $mybb->user['uid']. If it's bigger than 0 user is registered and if it's 0, he isn't. Can also check $mybb->user['usergroup']


RE: is there a MyBB Internal Variables for registred user ? - sharingamak - 2013-04-21

yes thanx i get it Big Grin


RE: is there a MyBB Internal Variables for registred user ? - .m. - 2013-04-21

checking $mybb->user['uid'] is reliable to find if visitor is a member or a guest ($mybb->user['uid'] > 0 implies that visitor is a member)


RE: is there a MyBB Internal Variables for registred user ? - sharingamak - 2013-04-21

yes with this

if ( $mybb->user['uid'] > "0")
Thank you !