Page 1 of 1

how to hide Role (SOLVED)

PostPosted: Tue Sep 25, 2012 10:59 pm
by zmmaj
How to hide from new users a ROLE sellection upon registration process?

Re: how to hide Role (SOLVED)

PostPosted: Thu Sep 27, 2012 10:26 pm
by zmmaj
Never mind ..
Simply provided code in example won't work for me... ( Problem with IsAdmin() command)

Code: Select all
function role__permissions(&$record){
    if ( isAdmin() ) return null;
    return Dataface_PermissionsTool::NO_ACCESS();
}

so I write new Role permision:
Code: Select all
function Role__permissions(&$record){
         $auth =& Dataface_AuthenticationTool::getInstance();
         $user =& $auth->getLoggedInUser();
  if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
else  return null;
}


Now all is OK... :)