registration form problem

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

registration form problem

Postby manifold » Sun Jul 10, 2011 4:50 pm

I'm trying to get the new user registration working, but have hit a road block. I have the login page appear, along with the 'Register' option.

The documentation seems to indicate that selecting 'Register' would result in a 'new record' page in the 'user' (or equivalent) table. Basically, it seems that all that is needed is something like:

' Register' - redirects to - 'htp://www.xxxxxx.com/application_directory/index.php?-action=new&-table=users'

But clicking on Register only yields a blank page..

I know this is a noob question; nevertheless, if someone can provide some insight, I'd appreciate it!

TIA,
-manifold
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am

Re: registration form problem

Postby manifold » Sun Jul 10, 2011 4:57 pm

Sorry,

Let me further clarify:

1) I know that 'htp' needs to be 'http' in the url i listed... as a new member here, using a URL incurs a scolding! It is correctly written in my code.

2) I do not actually get a white or blank page; I get this:

Registration Form
[-] Edit Details

So.. any suggestions would be appreciated!

-manifold
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am

Re: registration form problem

Postby shannah » Sun Jul 10, 2011 5:07 pm

what version of xataface are you using? It could be a permissions issue. Anonymous users need to have the register permission granted on the users table or at least some of it's fields.

I'm on my iPhone right now so can't easily post an example but will post one later.

Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: registration form problem

Postby manifold » Sun Jul 10, 2011 5:49 pm

Hi,

I'm using version 1.3

I've tried working with the 'users.php' file in order to assign permission to add a new record to an unlogged-in user, but that hasn't had any effect. I'm sure I've bungled something somewhere.

Thank you for your quick response, especially on a Sunday night! I am viewing this as a 'learn by doing .. and re-doing' experience, and so I'll also just soldier on.

-manifold
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am

Re: registration form problem

Postby shannah » Mon Jul 11, 2011 2:27 pm

1. Confirm if it is a permissions issue by allowing ALL permissions to all users.
2. Check your error logs for clues.

_Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: registration form problem

Postby manifold » Mon Jul 11, 2011 2:36 pm

Well, I've gotten the registration screen to appear, and I can register users. If i register in as an admin, everything works fine; if I log in as anything else, I get a 'permission denied - requires list permission, only granted 'register'.

I think I see the place to attack, just havent figured out how:

=====================================
<?php


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


class tables_users {

function getpermissions($record) {
if ( isAdmin() ) return null;
$perms['register'] = 1;
return $perms;

}
}
?>
=========================================

There must be something to follow, or replace the " $perm['register'] = 1 " so as to allow for the other built-in settings
(ie, Edit, Read Only, Delete).

Any pointers welcomed!

-manifold
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am

Re: registration form problem

Postby shannah » Mon Jul 11, 2011 2:54 pm

The permission denied you quote happened when you were trying to access the list action, not the register action. It confirms that your user has correctly been granted the register action.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: registration form problem

Postby manifold » Mon Jul 11, 2011 3:08 pm

Yes; however, when I register now, it seems a user (other than an admin) is permitted ONLY to register, and not do anything else... including successfully login after receiving his authorization email!

Getting closer...
"Heisenberg may have slept here."

"I'm positive I've lost an electron...."
manifold
 
Posts: 31
Joined: Wed Jun 29, 2011 8:49 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 2 guests

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