cakephp - How to add some action after login (and before redirection)? -
My kind of application is trying to develop some type of login tracker for the application.
I know that I need a code like:
$ this-> Data ['login session'] ['user name]] = $ _SERVER [' REMOTE_ADDR ']; $ This- & gt; Data ['login session'] ['ipAddress'] = $ _SERVER ['REMOTE_ADDR']; $ This- & gt; LoginSession-> ($ This-> data);
... in (I think) users_controller, but I do not know at all that
I would also like to track successful but failed logins.
Can you please help me with this? Thank you in advance!
Do you already have the login function?
function login (if ($ this-> AUTH- & gt; user ()) / your tracking luggage / db call here $$ - this- & gt; Redirect ($ -> - AUTH- & gt; Redirect ());}}
Comments
Post a Comment