Page 1 of 1

User Group

Posted: Sun Oct 14, 2007 12:15 pm
by selts
Hi,
I will like to retrieve the usergroup after login.
What is the variable to use? Basically, I want to know whether it is registered or special.
Thanks.

Re: User Group

Posted: Sun Oct 14, 2007 12:54 pm
by bascherz
In Joomla 1.0.x, $my->usertype returns a string representation. You could alternatively use $my->gid if you prefer the numeric values of each type of user. Values for $my->usertype are as follows (with $my->gid):

  • Public Frontend(29)
  • Registered(18)
  • Author(19)
  • Editor(20)
  • Publisher(21)
  • Public Backend(30)
  • Manager(23)
  • Administrator(24)
  • Super Administrator(25)

Make sure to declare $my global.