Re: How to to something after successful login (like callback) ?

2009-06-22 Thread u2ix

 seehttp://book.cakephp.org/view/395/autoRedirect

 regards,

 AD
oh much thanks.
i wonder why I never saw that.
But now it works, wonderful
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to to something after successful login (like callback) ?

2009-06-21 Thread u2ix

 UsersController:

 // this is the stripped-down version

 public function login()
 {
         if ($user = $this-Auth-user())
         {
                 $this-User-Login-create();
                 $this-User-Login-save(
                         array(
                                 'Login' = array(
                                         'user_id' = $user['User']['id']
                                 )
                         )
                 );
         }

 }

that won't work for me, i don't know why.
first I inserted your IF with the db update, but nothing happend.
then I tested the IF:
if ($user = $this-Auth-user())
{
exit();
}
but no effects.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to to something after successful login (like callback) ?

2009-06-19 Thread u2ix

Hello

I want to update a field in database (loginCount) after successful
login.
But I found now way where to insert this action, without to make a
redirect, as a callback or similar.
If I insert it in Users/login it will only be executed on getting the
login page, as I see?

How can I do this?

Thanks for help

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---