User Registration Error

Archived from the Xataface Users forum.

cantlep — Thu Sep 30, 2010 3:40 pm

Hi Steve, I noticed this same error on another post. I’ve checked the latest permissionsTool.php file in SVN and I have that version.

When click the register link to enable new users to register in 1.2.5 (http://xataface.com/wiki/registration_form), I get the following error in my web logs

Code: Select all
PHP Fatal error:  Call to undefined method dataface_actions_register_permissions_delegate::filterPermissions() in /var/www/html/public/workout/dataface/Dataface/PermissionsTool.php on line 172, referer: http://www.site.co.uk/index.php?-table=Users&-action=login_prompt&-cursor=0&-skip=0&-limit=30&-mode=list

Is there a fix for this at all?

Cheers


shannah — Wed Oct 06, 2010 10:51 am

Fixed in SVN rev. 1937.
http://weblite.ca/svn/dataface/core/tru … nsTool.php


cantlep — Wed Oct 06, 2010 12:04 pm

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