Fork me on GitHub

Rapport de message :*
 

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.
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

45 Personne(s) en ligne (32 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 45 | Plus ...