Gossamer Forum
Home : Products : DBMan : Customization :

More detailed logon

Quote Reply
More detailed logon
I would like to implement DBMan with logon of not only Username & Password, but with more detail of the user eg. email, address, etc.

Am I missing something or does DBMAn need to be tweaked to achieve this.

Any advice would be VERY WELCOME

Thanks in advance

Robin
Quote Reply
Re: More detailed logon In reply to
It would have to be tweaked. Do you want to add the email address to the password file? I have made a little modification (although someone said there was a problem with it) to allow for users to have their passwords mailed to them. You wouldn't have to use that part of it, but it does require new users to include their email addresses. You can pick it up at
http://www.drizzle.com/~hall/dbmod/lookup.txt

It might at least give you some ideas.


------------------
JPD
Quote Reply
Re: More detailed logon In reply to
JPD Smile

would you mind posting your html.pl public ? I have tried to add this feature but I get errors when adding the section in sub html_login_form . Though I added th ePipe to close the Tag before print qq| Frown

I saw it working on you Site so I though you could help out ?

Thanks again for your help

Broder
Quote Reply
Re: More detailed logon In reply to
Thanks for the info JPD

I was able to obtain the intended result by studying the documentation you referred me to.

Added email and other required fields to the logon.

Robin
Quote Reply
Re: More detailed logon In reply to
Broder--

This is the "form" part of the login form for my html.pl file:

Code:
print qq|
<form action="$db_script_url" method="post" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<P>
<table border=0>
<tr><td><$font_color><b>User ID:</b></font></td>
<td><input type="text" name="userid"></td></tr> <tr><td><$font_color><b>Password:</b></font></td>
<td><input type="password" name="pw"></td></tr>
</table>
<P><center> <input type="SUBMIT" name="login" value="Logon">
<input type="SUBMIT" name="logoff" value="Cancel">
</center></P>
</form>|;

if ($auth_signup) {
print qq|<P><$font>If you do not have an account, you can
<a href="$db_script_url?db=$db_setup&signup_form=1">
sign up for one online</a>.</font><P>
|;
}

if ($auth_lookup) {
print qq|<$font>If you have already signed up for an account,
and have forgotten your user name or password, you can
<a href="$db_script_url?db=$db_setup&lookup_form=1">have it emailed to you.</a></font>
|;
}

It's a little different from the "out-of-the-box" DBMan, because I moved the page formatting stuff out of the middle of the form.

---------------------

Robin--

Glad I was able to help! Smile




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

All my advice is offered on the basis of kindness-ware. If I've helped you to solve a problem, go out of your way to be kind to someone today.

Quote Reply
Re: More detailed logon In reply to
JPD,

i am thick. I feel a bit like a schoolboy in early years. There is an error and I can's see it ;(
This is the error I get:
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: syntax error at ./html.pl line 1108, near "

Would you mind having a look at www.broders.net/dbdebug/html.pl.txt ?
Much appreciated !

Cheers

Broder

[This message has been edited by Broder (edited March 01, 1999).]
Quote Reply
Re: More detailed logon In reply to
Starting at line 1091 -- add what's in bold:

Code:
<a href="$db_script_url?db=$db_setup&lookup_form=1">have it emailed to you.</a></font>
|;
}
print qq|</body>
</html>
|;

Line 1132 -- add a |;

Code:
</table>|;

Line 1137 -- add a print qq|

Code:
print qq|<p align=center><center>

Line 1402 -- did I do this? sorry!
needs to be qq| instead of quotes

Code:
if ($error) { print qq|<P><$font><font color="red">$error</font></font></P>|;
}

That oughta fix you right up.



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

All my advice is offered on the basis of kindness-ware. If I've helped you to solve a problem, go out of your way to be kind to someone today.



[This message has been edited by JPDeni (edited March 01, 1999).]
Quote Reply
Re: More detailed logon In reply to
Hi JPD Smile

Thank you sooo much. I finally got it working. The Password lookup and even a Welcome mail send to the New User right after login. Just in case somebody searches the DB for something like it here's a working snippet for Unix ( Red Hat Linux ) for the Welcome mail. IN db.cgi sub_signup right after &html_signup_success
Code:
open (MAIL, "|$mail_prog -t");
print MAIL "To: $in{'email'}\n";
print MAIL "Reply-to: you\@yourserver.com\n";
print MAIL "From: you\@yourserver.com\n";
print MAIL "Subject: Thanks for signing up !\n";
print MAIL "\n\n";
print MAIL "Welcome to whatever. Please make sure to write down\n" ;
print MAIL "your Login name and password. They are Case sensitive !\n" ;
print MAIL "\n" ;
print MAIL "In case you forget them, we have a lookupform on our Website.\n" ;
print MAIL "\n" ;
print MAIL "If you are happy with our Service we would appreciate if you spread the word ;-).\n" ;
print MAIL "\n" ;
print MAIL "Should you have any questions about our Website or the offered Service, please\n" ;
print MAIL "do not hesitate to contact us by either replying to this mail or sending a mail\n" ;
print MAIL "to the above address.\n" ;
print MAIL "\n\n";
close (MAIL);

at the top of db.cgi you have to add the path to your sendmail program ..something like
Code:
#!/usr/bin/perl
$mail_prog = '/usr/sbin/sendmail' ;
#
# ----------------------
# DBMan


Thanks again JPD ! Now the next task will be getting a cup of Earl Grey ( seems it helped a lot Wink ) and then see if DBMAN can handle it.

Cheers

Broder


[This message has been edited by Broder (edited March 02, 1999).]