To get the user group id in Joomla 2.5.15, I completed the documentation in the Joomla Documentation here
My code is as follows:
$user = JFactory::getUser(); echo "<p>Your group id is {$user->gid}.</p>";
But this code causes an error: Note: Undefined property: JUser :: $ gid in Without group identifier at the output.
php joomla
Nuno nogueira
source share