public function check email password select this- getAdapter select fr

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
public function check($email, $password){
$select=$this->getAdapter()->select()
->from($this->_name)
->where('users.email = ?', $email);
$stmt = $this->getAdapter()->query($select);
$result = $stmt->fetchAll();
$a=2;
if (!empty($result))
{
if ($result['password'] = $password) {
$a=1;
} else if (!$result['password'] = $password){
$a=0;
}
}
return $a;
}