i tired this method to get users last_login but no success if i set
the auth redirect to false then when i acess the users/login form to
login it keeps redirecting me to ('/') not even leting put username
and password
any idea
function beforeFilter( ) {
parent::beforeFilter();
$this->Auth->loginAction = array('admin' => false, 'controller' =>
'users', 'action' => 'login');
$this->Auth->autoRedirect = false;
}
function login() {
if ($this->Auth->User()) {$this->User->id = $this->Auth->user('id');
{
$this->User->saveField('last_login', date('Y-m-d H:i:s'));
}
$this->redirect($this->Auth->redirect());
$this->set('allowRegistrations', $this->settings
['allowRegistrations']);
}
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment