how to hide Role (SOLVED)

A place for users and developers of the Xataface to discuss and receive support.

how to hide Role (SOLVED)

Postby zmmaj » Tue Sep 25, 2012 10:59 pm

How to hide from new users a ROLE sellection upon registration process?
Last edited by zmmaj on Fri Sep 28, 2012 1:43 am, edited 1 time in total.
zmmaj
 
Posts: 48
Joined: Tue Sep 25, 2012 10:34 pm

Re: how to hide Role (SOLVED)

Postby 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... :)
zmmaj
 
Posts: 48
Joined: Tue Sep 25, 2012 10:34 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 20 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved