Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Bug in login_user.asp (?)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug in login_user.asp (?)

 Post Reply Post Reply
Author
Badal View Drop Down
Newbie
Newbie


Joined: 15 June 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Badal Quote  Post ReplyReply Direct Link To This Post Topic: Bug in login_user.asp (?)
    Posted: 14 September 2005 at 1:03am
Hi,
 
login_user.asp, line 167-172:
 
   'For extra security create a new user code for the user
   strUserCode = userCode(strUsername)
   
   'Save the new usercode back to the database
   rsCommon.Fields("User_code") = strUserCode
   rsCommon.Update
Resetting the User_code causes the "N0act" to be removed (if it was there), and suspended members become able to reactivate their account through Resend Activation Email. I temporarily managed to workaround it by replacing it with:
 
   strUserCode = rsCommon("User_code")
 
Please fix it.
 
Regards,
Zeeshan Ahmed.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2005 at 4:00am
Changing the line to the following will sort the problem:-

If blnActive Then strUserCode = userCode(strUsername)
Back to Top
Badal View Drop Down
Newbie
Newbie


Joined: 15 June 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Badal Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2005 at 9:37am

Originally posted by -boRg- -boRg- wrote:

Changing the line to the following will sort the problem:-

If blnActive Then strUserCode = userCode(strUsername)

This will cause the user code for suspeneded members to be updated with a blank one (as strUserCode is still not initialized). If we update user code then it should be as:
 
If blnActive Then
   'For extra security create a new user code for the user
   strUserCode = userCode(strUsername)
   
   'Save the new usercode back to the database
   rsCommon.Fields("User_code") = strUserCode
   rsCommon.Update
End If
 
Regards,
Zeeshan Ahmed.
Back to Top
Badal View Drop Down
Newbie
Newbie


Joined: 15 June 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Badal Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2005 at 9:43am
Forgot to mention Confused , the line:
 
   strUserCode = rsCommon("User_code")
 
must be before the above code or in Else of it, as:
 
Ib blnActive Then
   'For extra security create a new user code for the user
   strUserCode = userCode(strUsername)
   
   'Save the new usercode back to the database
   rsCommon.Fields("User_code") = strUserCode
   rsCommon.Update
Else
   strUserCode = rsCommon("User_code")
End If
 
Back to Top
Badal View Drop Down
Newbie
Newbie


Joined: 15 June 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Badal Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2005 at 10:08am

Sorry for posting 3rd time, but how can we use blnActiveMember (not blnActive)? It is still not set upto that code. If will be set in common.asp after the code redirect the user to login_user_test.asp upon successful login. Before this, it will be always True (default value, initialized in common.asp). So the code will be excuted even if the user is not active.

Perhaps here, instead of blnActiveMember, rsCommon("Active") = True should be used, and tblAuthor.Active should be included in SELECT of SQL querry.
Back to Top
Skyforum View Drop Down
Groupie
Groupie


Joined: 26 August 2005
Location: United States
Status: Offline
Points: 90
Post Options Post Options   Thanks (0) Thanks(0)   Quote Skyforum Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2005 at 3:28pm
LOL, you guys let me know when you get it all worked out.... I got some punchin gloves in the car of you need them...
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.