[ic] login routine

Stefan Hornburg racke at linuxia.de
Fri Dec 10 16:00:58 EST 2004


On Fri, 10 Dec 2004 10:29:37 -0800
Scott Andreas <webteam at wes-state.com> wrote:

> Hello list
> 
> I've got a new client and I'm trying to create a login routine much like 
> the affiliate login routine.  The database is nha.db and consist of rows
> code|agree|name|email|company|etc.... from an imported text file nha.txt
> 
> In catalog.cfg I have...
> 
> # minimal login stuff for nha affiliate
> UserDB  nha  database        nha
> UserDB  nha  user_field      email
> UserDb  nha  pass_field      code
> UserDB  nha  crypt           0
>  
> which should use the email field for the username and code field for the 
> password
> 
> In the login page I have...
> 
> [set NHALogin]
> [if session logged_in]
> [userdb logout]
> [/if]
> [userdb function=login profile=nha]
> [/set]
> 
> 
> <table border="0" cellspacing="0" cellpadding="0">
> <FORM ACTION="[process secure=1]" METHOD=POST>
> <INPUT TYPE=hidden NAME=mv_session_id value="[data session id]">
> <INPUT TYPE=hidden NAME=mv_click VALUE=NHALogin>
> <INPUT TYPE=hidden NAME=mv_todo  VALUE=return>
> <INPUT TYPE=hidden NAME=mv_nextpage VALUE="nha/index">
> <tr>
>   <td>
>     <table border="0" cellspacing="0" cellpadding="2">
>     <tr>
>       <td align="right">
>         <b>[L]Username[/L]:</b>
>       </td>
>       <td align="left">
>         <INPUT NAME=mv_username VALUE="">
>       </td>
>     </tr>
>     <tr>
>       <td align="right">
>         <b>[L]Password[/L]:</b>
>       </td>
>       <td align="left">
>         <INPUT TYPE=password NAME=mv_password VALUE="">
>       </td>
>     </tr>
>     <tr>
>       <td>&nbsp;</td>
>       <td>
>         <input type="submit" value="[L]Log In[/L]">
>       </td>
>     </tr>
>  with the go to if succeed page page of...
> 
> [if !session logged_in]
> [or session login_table ne 'nha']
>     [bounce page="nha/login"]
> [/if]
> But I get errors of...
> 
> 67.41.84.196 fn4bEfCZ:67.41.84.196 - [10/December/2004:12:11:08 -0600] 
> wes-state /cgi-bin/wes-state/process Denied attempted login with 
> nonexistent user name 'myname at mydot.com'
> 
> I've tried UserDB nha indirect_login email in catalog.cfg. 

Try a setting like that:

UserDB nha database company nha
UserDB nha indirect_login email
UserDB nha crypt 0
UserDB nha user_field code

The username in the session ([data session username]) will be then
the value from the code column.

Ciao
	Racke


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list