Re: groupe et id utilisateur | Titre du sujet : Re: groupe et id utilisateur par alain01 sur 10/02/2013 12:42:28
Génial, ça marche nickel :
<{php}>
Global $xoopsUser;
$this->assign( 'authorised_groups', array( 6,) ); // list of the authorised group id
$this->assign( 'user_group', is_object($xoopsUser) ? $xoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS) );
<{/php}>
<{if array_intersect($authorised_groups, $user_group)}>
ici mon texte réservé au groupe "6"
<{/if}>
Merci Tatane ! (l'est trop fort ce tatane ^^)
Au fait, pour info, pour XOOPS 2.5.5, ce n'est plus : $user.uname, $user.uid mais $xoops_uname, $xoops_uid.
|
|