This topic is locked

forcing password reset

5/20/2010 5:50:18 PM
ASPRunnerPro General questions
M
mfred author

I have a printing order system. WIth all the versions, I have used the method of sending the login information to users that forget their login. However, I have a new client that wants the system but requires any password sent via email to be generic. So he wans the user admin to change forgotten passwords to a generic and then have the system prompt the user to change the password if the generic one is used. I already include a module in the system where people can change their user information. But I don't know how to prompt the user to change their password if a specific one is used. Any ideas?

A
ann 5/21/2010

Hi,
to promt user to change his password create an additional field in the Users table, say CheckPass. Use After successful registration event on the Events tab to assign the field:

userdata("CheckPass")=1



Use After password remind event to mark that field has been changed:

sql = ""

if username<>"" then

sql="update UsersTable set CheckPass=0 where Username='" & username & "'"

end if

if email<>"" then

sql="update UsersTable set CheckPass=0 where Email='" & email & "'"

end if

if sql<>"" then

CustomQuery(sql)

end if



Finally use After successful login event to promt the user to change password:

if data("CheckPass")=0 then

ResponseRedirect "changepassword.asp"

end if
M
mfred author 5/21/2010

Thanks