From 5be6f451d7d7a67d9fc35a738227c050451b14e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Fri, 11 Apr 2014 17:39:56 +0200 Subject: [PATCH] login only active --- app/Controller/Component/MiconwareSessionComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controller/Component/MiconwareSessionComponent.php b/app/Controller/Component/MiconwareSessionComponent.php index 3bf2d76..3f0300b 100755 --- a/app/Controller/Component/MiconwareSessionComponent.php +++ b/app/Controller/Component/MiconwareSessionComponent.php @@ -76,7 +76,7 @@ class MiconwareSessionComponent extends Component { public function login($mail,$password){ $users=$this->User->find('first', array( 'fields' => array('User.id','User.password'), - 'conditions' => array('User.mail' => $mail) + 'conditions' => array('User.mail' => $mail,'User.is_active'=>true) )); if($this->validate_password($password,$users['User']['password']) and !$this->isLoggedin()){ echo $users['User']['id'];