Gossamer Forum
Home : Products : DBMan : Customization :

Ask skip login for new user

Quote Reply
Ask skip login for new user
Hello all,

I want let the new user skin login.
When create the login a/c then direct go to add record. After 1 first login, every login is modify own record?

Thx

------------------
Quote Reply
Re: Ask skip login for new user In reply to
The best way to do this is to have a new user sign up for an account as usual. You would need to have the UserID field as your $db_key.

After login, the script would search for a record for the user. If a record doesn't exist, they would be sent to the "add" form. If it does, they would be send to the "modify" form.

Add the following to html_home, right at the beginning of the subroutine:

Code:
unless ($per_admin) {
%rec=&get_record($db_userid);
unless (%rec) {
&html_add_form;
return;
}
else {
$in{'modify'} = $db_userid;
&html_modify_form_record;
return;
}
}

This will allow you (as admin) to do everything, but users will only be allowed to either add or modify.

I would also make sure that your @auth_signup_permissions = (0,1,1,1,0);

And you would need to change some things on the footer so the users wouldn't get the menu.

I would change all the permissions in the footer to

if ($per_admin);

(This is at the end of each line in the footer menu.)

If you want users to be able to delete their records, leave the "Delete" line as it is.


------------------
JPD





Quote Reply
Re: Ask skip login for new user In reply to
Thx JPDeni