Return to Snippet

Revision: 34164
at October 18, 2010 21:15 by jmaties


Initial Code
global $user;
$adminRoles= array('monitor','editor');
$adminAble= FALSE;
foreach($adminRoles as $role) {
  if( in_array($role, array_values($user->roles)) ) $adminAble= TRUE;
}
if($adminAble) {
    return inicio;
} else {
return user;
}

Initial URL

                                

Initial Description

                                

Initial Title
Redireccion por ROLE (Drupal)

Initial Tags
drupal

Initial Language
PHP