Gossamer Forum
Home : Products : DBMan : Installation :

Auto filled username and email address question

Quote Reply
Auto filled username and email address question
I don't know if this is possible. When the first time use create an account, they already provided Username and email address. Is there anyway these info filled automatically (they can't change these info) when they add a record (each user can add only 1 record)?

Thanks for any help.

Last edited by:

eqtran: Oct 2, 2002, 10:41 AM
Quote Reply
Re: [eqtran] Auto filled username and email address question In reply to
For the userid here is the codes to add:

Add userid automatically when adding records

Changes in db.cgi

In sub get_defaults replace:

foreach $field (keys %db_defaults) {
$default{$field} = $db_defaults{$field};
}

with:

foreach $field (keys %db_defaults) {
$default{$field} = $db_defaults{$field};
####### add userid in add form ###########
unless ($per_admin) { ($auth_user_field >=0) and ($db_defaults{$db_cols[$auth_user_field]} = $db_userid); }
}


In sub add_record instead of:

# Set the userid to the logged in user.
##### ($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);

use:

# Set the userid to the logged in user (except if admin).
unless ($per_admin) { ($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid); }

Are you using the password lookup mod? I'm not sure how the email is being stored. I'm sure if you search within the FAQ you will find a solution for the email address part.

Hope this helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Auto filled username and email address question In reply to
Yes, I am using Secure Password Lookup mod but the email address is stored in default.pass file.

Thanks for your help.
Quote Reply
Re: [eqtran] Auto filled username and email address question In reply to
I've haven't used that mod before, but this thread may provide the solution:

http://gossamer-threads.com/...aded&post=123877

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Auto filled username and email address question In reply to
The username mod works fine for me. But the email mod that you recommended doesn't work for me. When I hit submit, it said Email is required eventhough the email already filled. And on the error page, the email was blank. Anyway, thanks for you help and great username filled mod.

Last edited by:

eqtran: Oct 2, 2002, 8:37 PM
Quote Reply
Re: [eqtran] Auto filled username and email address question In reply to
Don't give up yet :)

Please check the FAQ noted below either under the section "Admin" or "Email" and I'm sure you will find a solution that works.

Also be sure that you are entering the email field the same on your form as you are in the command to enter it .. remembering it is case sensitive.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/