how to hide Role (SOLVED)
Archived from the Xataface Users forum.
zmmaj — Tue Sep 25, 2012 10:59 pm
How to hide from new users a ROLE sellection upon registration process?
zmmaj — Thu Sep 27, 2012 10:26 pm
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…