This topic is locked
[SOLVED]

 Document Manager Template - cannot get it to work with registration

2/9/2014 10:48:43 PM
PHPRunner General questions
K
karmacomposer author

For people who use the document manager template, I am having a bit of a problem:
It works 100% if I hard code a username and password, however, if I want to have a registration page and have people login,

it does not go to the menu page after successful login - instead it goes to the doc_files_list.php page - which shows nothing

and there are no buttons to add/edit anything.
Also, I added two fields to the doc_users table - act (integer) and steamkey (varchar)
act field is for activation and steamkey is for exactly that, a users steamkey.
steamkey is added to the user registration page, but is not required.
I did NOT change ANY code at all. I just added the fields and activated a user registration page.
Before I added any fields,. I just uploaded it as is and it did the same thing. Only hard coding a username and

password seems to work. The registration/login seems to work fine. It says registration is successful and does provide an

email with a link to activate the account. Login also appears successful, but sends me to the wrong place.
How can I get this template to work? How can I use the template without hard coding a username and password?
Also, once this is fixed, I need make sure that no users can see other peoples info at all - will that also make the

document manager template cease to work properly?
Thank for anyone's help. I need to get this working.
Mike

K
karmacomposer author 2/9/2014

Oy!
I figured it out. SHEESH! I did not realize there was a usertype variable and once I looked at PhpMyAdmin it was very clear that an admin has to edit users to be either a 'guest', a 'user' or a 'admin'.
How do I automatically make everyone a 'user'? I guess I can hard-code that field to always be a 'user'????
Any thoughts?
Mike

Sergey Kornilov admin 2/10/2014

Use BeforeRegister event to populate usertype field.

$userdata["usertype"]="user";


More info:

http://xlinesoft.com/phprunner/docs/before_registration.htm

K
karmacomposer author 2/20/2014



Use BeforeRegister event to populate usertype field.

$userdata["usertype"]="user";


More info:

http://xlinesoft.com/phprunner/docs/before_registration.htm


TY. I put that in the appropriate spot.
Mike