This topic is locked

Redirect Login if account disabled

1/14/2010 12:07:04
ASPRunnerPro General questions
P
PCB author

I have a subscription based system. If a user has not paid, I would like to somehow redirect them after login to a page that indicates their account\access has been disabled.
Is their any way to accomplish this?

J
Jane 1/15/2010

Phillip,
use AfterSuccessfulogin event on the Events tab for this purpose.

You can check how it works in the Members template:

http://www.xlinesoft.com/templates/members/index.htm

C
clig 1/18/2010



I have a subscription based system. If a user has not paid, I would like to somehow redirect them after login to a page that indicates their account\access has been disabled.
Is their any way to accomplish this?


here is a sample
Sub AfterSuccessfulLogin(username,password)
strSQLExists = "Select Name, Email, Role, simsLogin, simsRepNo, Identifier, DistList From NTSS_USERS Where LoginName = " & "'" & cstr(SESSION("UserID")) & "'"

set rsExists = CreateObject("ADODB.Recordset")

rsExists.Open strSQLExists, dbConnection
if not rsExists.eof then

SESSION("UserIDName") = rsExists("Name")

SESSION("UserIDEmail") = rsExists("Email")

SESSION("UserIDRole") = rsExists("Role")

SESSION("simsLogin") = rsExists("simsLogin")

SESSION("simsRepNo") = rsExists("simsRepNo")

SESSION("Identifier") = rsExists("Identifier")

SESSION("DistList") = rsExists("DistList")
else
end if

rsExists.Close : set rsExists = Nothing
If SESSION("Identifier") = "Expired" Then
response.redirect "blahblah.."
End If
End Sub ' AfterSuccessfulLogin