login only active

This commit is contained in:
Martin Müller 2014-04-11 17:39:56 +02:00
parent c169fd9305
commit 5be6f451d7
1 changed files with 1 additions and 1 deletions

View File

@ -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'];