Re: User Authentication

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 54522
interpreted = N
texte = On 11/27/03 9:11 AM, "Alan White" wrote: I see where you are going with this but a couple of things: Here is an alternative (based on the fields being called u_username & u_password) A couple of points. I did this with hide and show ifs... Just my preference. You can convert to if thens if you choose. You don't need to compare and test the username because it is used as the search string... Hence there would be no match if it wasn't already qualified. Second, I did a search as I am setting 3 VARS so it is just easier for me than 3 lookups. And I set them to default values first. I added a line for checking for duplicates... Which WILL mess you up down the road. Trust me on that. I just wrote this quickly so I may have missed something, but I think the logic is sound. :-) HTH Alex [text]U_usernameVAR=0[/text] [text]U_passwordVAR=0[/text] [text]U_AccessLevelVAR=0[/text] [search db=admin/users.db&eqU_usernameDATArq=[_username]] [showif [numfound]>1]Something here because you have more than 1 identical U_username field[/showif] [showif [numfound]=0] No matches for username... Send them back to login form[/showif] [founditems] [text]U_usernameVAR=[U_username][/text] [text]U_passwordVAR=[U_password][/text] [text]U_AccessLevelVAR=[U_accesslevel][/text] [/founditems] [/search] [showif [url][U_passwordVAR][/url]=[url][_password][/url]] Password matches... Now just check against security level for content[/showif] [hideif [url][U_passwordVAR][/url]=[url][_password][/url]] Password failed... Send them back to the login form[/hideif] > [text]checkName=[lookup > db=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=userNam > e][/text] > [if "[_userName]"="[checkName]"] > [then] > [text]checkPass=[lookup > db=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=passwor > d][/text] > [if ("[_userName]"="[checkName]") & ("[_password]"="[checkPass]") > [then] > [lookup > db=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=accessL > evel] > [redirect > url=https://www.hanon-shop.com/press/press.html?accessLevel=[accessLevel]] > [/then] > [else] > [redirect > url=https://www.hanon-shop.com/press/index.html?error=2] > [/else] > [/if] > [redirect url=https://www.hanon-shop.com/press/press.html] > [/then] > [else] > [redirect url=https://www.hanon-shop.com/press/index.html?error=1] > [/else] > [/if] Alex J McCombie New World Media Chief Information Officer Box 124 888/892.6379 MartVille, NY 13111 Alex@NewWorldMedia.com http://OurClients.com Interface Designer WebDNA Programmer Database Designer ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: user authentication via TCPSend ( Terry Wilson 2005)
  2. Re: user authentication via TCPSend ( John Peacock 2005)
  3. user authentication via TCPSend ( Terry Wilson 2005)
  4. Re: User Authentication ( Stuart Tremain 2003)
  5. Re: User Authentication ( Gary Krockover 2003)
  6. Re: wierd... [Was] User Authentication ( Alan White 2003)
  7. wierd... [Was] User Authentication ( Alan White 2003)
  8. Re: User Authentication ( Alan White 2003)
  9. Re: User Authentication ( Alan White 2003)
  10. Re: User Authentication ( Gary Krockover 2003)
  11. Re: User Authentication ( Alex McCombie 2003)
  12. Re: User Authentication ( Alex McCombie 2003)
  13. Re: User Authentication ( Andy Mowrey 2003)
  14. Re: User Authentication ( Alex McCombie 2003)
  15. Re: User Authentication ( Alan White 2003)
  16. Re: User Authentication ( Alex McCombie 2003)
  17. User Authentication ( Alan White 2003)
On 11/27/03 9:11 AM, "Alan White" wrote: I see where you are going with this but a couple of things: Here is an alternative (based on the fields being called u_username & u_password) A couple of points. I did this with hide and show ifs... Just my preference. You can convert to if thens if you choose. You don't need to compare and test the username because it is used as the search string... Hence there would be no match if it wasn't already qualified. Second, I did a search as I am setting 3 VARS so it is just easier for me than 3 lookups. And I set them to default values first. I added a line for checking for duplicates... Which WILL mess you up down the road. Trust me on that. I just wrote this quickly so I may have missed something, but I think the logic is sound. :-) HTH Alex [text]U_usernameVAR=0[/text] [text]U_passwordVAR=0[/text] [text]U_AccessLevelVAR=0[/text] [search db=admin/users.db&eqU_usernameDATArq=[_username]] [showif [numfound]>1]Something here because you have more than 1 identical U_username field[/showif] [showif [numfound]=0] No matches for username... Send them back to login form[/showif] [founditems] [text]U_usernameVAR=[U_username][/text] [text]U_passwordVAR=[U_password][/text] [text]U_AccessLevelVAR=[U_accesslevel][/text] [/founditems] [/search] [showif [url][U_passwordVAR][/url]=[url][_password][/url]] Password matches... Now just check against security level for content[/showif] [hideif [url][U_passwordVAR][/url]=[url][_password][/url]] Password failed... Send them back to the login form[/hideif] > [text]checkName=[lookup > db=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=userNam > e][/text] > [if "[_userName]"="[checkName]"] > [then] > [text]checkPass=[lookup > db=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=passwor > d][/text] > [if ("[_userName]"="[checkName]") & ("[_password]"="[checkPass]") > [then] > [lookup > db=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=accessL > evel] > [redirect > url=https://www.hanon-shop.com/press/press.html?accessLevel=[accessLevel]] > [/then] > [else] > [redirect > url=https://www.hanon-shop.com/press/index.html?error=2] > [/else] > [/if] > [redirect url=https://www.hanon-shop.com/press/press.html] > [/then] > [else] > [redirect url=https://www.hanon-shop.com/press/index.html?error=1] > [/else] > [/if] Alex J McCombie New World Media Chief Information Officer Box 124 888/892.6379 MartVille, NY 13111 Alex@NewWorldMedia.com http://OurClients.com Interface Designer WebDNA Programmer Database Designer ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Alex McCombie

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

NT Version on IIS 4.0 (1997) PSC recommends what date format yr 2000??? (1997) Thanks for tips, more quest (1997) WebCatalog2 Feature Feedback (1996) Kill the webcat process (2000) Webcat causing crashes left and right! (1997) Bug Report, maybe (1997) My solution... (1996) CGI Request Time Out (1997) Image maps/Webcat (1997) (thx) automating a POST (2002) Secure server question (1997) [WebDNA] SCOPE:, ---- was:--- Date: header on emails - timezone problem perhaps (emai) weird G3 happenings (1998) AD Error Msg (1997) Cookie set browser session. (1998) form data submission gets truncated (1997) Only charge card when product shipped ? (1997) Shopping problems with 2.1b3 acgi (1997) macosx 1 process, linux N processes, macosx chokes under load (2001)