How to get the proper GID Topic is solved

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
superboer12

How to get the proper GID

Post by superboer12 » Fri Nov 23, 2007 2:38 pm

I recently started developing for Joomla (1.0.13).
Currently I am working on a custom component.

In the front-end I would like to restrict some options to editors or above.
My idea to accomplish this is to use the GID of the user (should be between 20 and 25).

I tried

Code: Select all

global $my;
echo $my->gid;

The admin user has GID 25, but when I am logged in with 'admin' the above prints '2'.

What am I doing wrong?

Post Reply