This commit is contained in:
Martin Müller 2014-04-17 00:01:54 +02:00
parent 3f4aac20da
commit c4b03bba1e
3 changed files with 6 additions and 5 deletions

View File

@ -80,9 +80,10 @@ class MiconwareSessionComponent extends Component {
'conditions' => array('User.mail' => $mail,'User.is_active'=>true)
));
if($this->validate_password($password,$users['User']['password']) and !$this->isLoggedin()){
echo $users['User']['id'];
$this->Session->write('user',$users['User']['id']);
return true;
$result = $this->User->saveField('last_login', date(DATE_ATOM));
if($result)
$result = $this->Session->write('user',$users['User']['id']);
return $result;
}
return false;
}

View File

@ -61,7 +61,7 @@ class DreamjobCompany extends AppModel {
$data['User']['date_joined'] = date(DATE_ATOM);
$this->User->create(array('User'=>$data['User']));
$result=$this->User->save();
if($result){

View File

@ -77,7 +77,7 @@ class DreamjobWorker extends AppModel {
$data['AppUser']['bday'] = $data['User']['bday'];
$data['User']['date_joined'] = date(DATE_ATOM);
$this->User->create(array('User'=>$data['User']));
$result=$this->User->save();
if($result){