Print Page | Close Window

Bug in login_user.asp (?)

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=16544
Printed Date: 16 April 2026 at 2:37am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Bug in login_user.asp (?)
Posted By: Badal
Subject: Bug in login_user.asp (?)
Date 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.



Replies:
Posted By: WebWiz-Bruce
Date Posted: 14 September 2005 at 4:00am
Changing the line to the following will sort the problem:-

If blnActive Then strUserCode = userCode(strUsername)


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Badal
Date 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.


Posted By: Badal
Date 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
 


Posted By: Badal
Date 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.


Posted By: Skyforum
Date 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...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net