kevind
Posts: 251
|
| Posted: 10/14/2008, 7:42 AM |
|
My application is using the 'Remember Me' feature for the login page - therefore, when a user accesses a restricted page and the 'system' logs them in automatically, there is no 'on click' event to capture from the login form.
How do i trap the fact that the user has been logged in?
I'm trying to update a table to show the user is actively working in the application - i can also do this at page load i suppose, just thought the login phase would be the best.
thanks,
kevin
_________________
thanks
Kevin
======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
|
 |
 |
melvyn
Posts: 333
|
| Posted: 10/14/2008, 12:56 PM |
|
In the login form check the "login" button. It have the onclick event. You can add custom code wich will be executed after the login event.
How do you know if the user is really logged of if the user failed? In any page you can use CCGetSession("UserID") and/or CCGetSession("UserLogin"), in the footer (for example).
if (CCGetSession("UserID") > 0){
echo "user ". CCGetSession("UserLogin")." is logged";
// your code here (update db or whatever you like).
}else{
echo "no user is logged"
}
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
kevind
Posts: 251
|
| Posted: 10/14/2008, 1:45 PM |
|
Quote melvyn:
In the login form check the "login" button. It have the onclick event. You can add custom code wich will be executed after the login event.
How do you know if the user is really logged of if the user failed? In any page you can use CCGetSession("UserID") and/or CCGetSession("UserLogin"), in the footer (for example).
if (CCGetSession("UserID") > 0){
echo "user ". CCGetSession("UserLogin")." is logged";
// your code here (update db or whatever you like).
}else{
echo "no user is logged"
}
thanks - do you mean that the 'remember me' feature (where the application logs the user in by itself) is calling the login page and clicking the Login button ? If so, I assume i'd use the server side onclick event.
Please advise if you know that the auto-login is calling and submitting the login page and reacting to the 'on-click' server event.
thanks,
Kevin
_________________
thanks
Kevin
======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
|
 |
 |
|