Trouble with registration

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

Trouble with registration

Postby silenis » Wed Jun 30, 2010 12:21 am

Hello,

First I would like to tell thank you to all the people working on Xataface. It is a really good tool and I really enjoy learning it.

I must confess that I am not a specialist of php and I have some troubles to set up everything. I usually find the solution by myself but here after 3 full days of full work, I really need your expertise.

Basically, I am setting up a registration form. The authentication is working perfect but impossible to make the registration form working. I always get the following error:

Code: Select all
Fatal error: Call to undefined method dataface_actions_register_permissions_delegate::filterPermissions() in <PATH>/Dataface/PermissionsTool.php on line 172


For your information, here is some code that might be useful. As you will see I tried to stick as close as possible from the xataface tutorials:

conf.ini

Code: Select all
[_auth]
users_table=users
username_column=login
password_column=password
allow_register=1


ApplicationDelegate.php

Code: Select all
<?
class conf_ApplicationDelegate {
     function getPermissions(&$record){
         $auth =& Dataface_AuthenticationTool::getInstance();
         $user =& $auth->getLoggedInUser();
         if ( !isset($user) ) return Dataface_PermissionsTool::getRolePermissions('NO ACCESS');
         $role = $user->val('role');
         return Dataface_PermissionsTool::getRolePermissions($role);
      }
}
?>


include in index.php

Code: Select all
function isAdmin(){
    $auth =& Dataface_AuthenticationTool::getInstance();
    $user =& $auth->getLoggedInUser();
    if ( $user and $user->val('role') == 'ADMIN')  return true;
    return false;
}


users.php

Code: Select all
class tables_users {
    function getPermissions($record){
        if ( isAdmin() ) return null;
        $perms['register'] = 1;
        return $perms;
     
    }


I hope that someone will be able to show me the right path since I am really stuck.

Many thanks

Vincent
silenis
 
Posts: 1
Joined: Wed Jun 09, 2010 12:45 pm

Re: Trouble with registration

Postby shannah » Mon Jul 05, 2010 4:38 pm

Sorry... I found that I had forgotten to commit the registration code to support the register permission with the last release. It is now in SVN and will be included with the next release some time this week.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 22 guests

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