Пример #1
0
 /**
  * Check user
  *
  * Check if user exists and if yes, log in him.
  * 
  * @param  $email
  * @param  $password
  * @return boolean
  */
 public function checkUser($email, $password)
 {
     // echo "$email, $password | " . $this->passwordHash($password);
     $userCheck = $this->db->user(array('email' => $email, 'password' => $this->passwordHash($password)))->fetch();
     if ($userCheck) {
         $this->login($userCheck['id']);
         return $userCheck;
     }
     return false;
 }