login only active
This commit is contained in:
parent
c169fd9305
commit
5be6f451d7
|
@ -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'];
|
||||
|
|
Loading…
Reference in New Issue