Gossamer Forum
Home : Products : DBMan : Customization :

E-mail same as used to register with

Quote Reply
E-mail same as used to register with
I have the secure password mod installed. How do I make sure the e-mail address used for it is the same one entered in the database records in the e-mail field?
Quote Reply
Re: E-mail same as used to register with In reply to
You do not allow the user to enter an email address. Make the field a hidden field on your form. Then use the get_email subroutine that is included in the mod.


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





Quote Reply
Re: E-mail same as used to register with In reply to
Hello,

When you say, "Make the field a hidden field on your form," what do you mean? Do you mean making it a type=HIDDEN or do you mean setting it as -1 in the cfg file?

Thank you -- sorry to be so naive Smile

Should there be TWO email fields -- one for public display and one just for the .pass file? I'm confused on how this should behave, if I'm a record owner and am adding or updating my info. Thanks for any help!

[This message has been edited by Glen Payne (edited September 07, 1999).]
Quote Reply
Re: E-mail same as used to register with In reply to
No, there should not be two fields. Here is what you do:

1) In sub html_record_form, after
my (%rec) = @_;

ADD

Code:
if ($in{'add_form'}) {
$rec{'Email'} = &get_email;
}

Make sure that you change the field,"Email" to your field name for the email field in the default.cfg file.

2) Then you add a HIDDEN field like the following:

Code:
<INPUT TYPE=HIDDEN NAME="Email" VALUE="$rec{'Email'}>

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 07, 1999).]
Quote Reply
Re: E-mail same as used to register with In reply to
Thanks, Eliot...I believe I've got this figured out. I wanted to have the email address HIDDEN so users didn't try to change them on the modification form (they should use the change email address form instead); yet I wanted them to be able to see their email adresses as well. So now I just print out the value of the email address right after the hidden field.

Thanks for your help!
Quote Reply
Re: E-mail same as used to register with In reply to
Glad it works.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 07, 1999).]