Cheers Steve,
This now doesn't give an error...However it only shows the collapsible "Edit Details" section with nothing in it (rather than the fields to actually add the user details).
I have this in my Users table delegate class
- Code: Select all
function getPermissions($record){
if ( isAdmin() ) return null;
$perms['register'] = 1;
return $perms;
}
However, it only allows the register form to work if I have these lines in there also (and by doing this, presents the "New" option in Users (although not in any other tables).
- Code: Select all
if ( isUser() ) return null;
$perms['new'] = 1;
the isUser function is in index.php and looks like this:
- Code: Select all
function isUser(){
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( $user and $user->val('Role') == 'WORKOUTUSER') return true;
return false;
}
Am I missing something?
Also, should be worth noting that in the tabel delegate class, it doesn't seem to make a difference whether
- Code: Select all
$perms['register'] = 1;
is set or not (as long as new=1 is there, it still shows the registration link and displays the form correctly)
Cheers