This commit is contained in:
Martin Müller 2014-04-17 00:17:00 +02:00
parent 6f9c37ab3a
commit 2cad9784a8
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ class MiconwareSessionComponent extends Component {
'conditions' => array('User.mail' => $mail,'User.is_active'=>true)
));
if($this->validate_password($password,$users['User']['password']) and !$this->isLoggedin()){
$this->User->id = $users['User']['id'];
$result = $this->User->saveField('last_login', date("Y-m-d H:i:s"));
if($result)
$result = $this->Session->write('user',$users['User']['id']);