Example #1
0
 /**
  * Get users data if he has got n account and if his password is ok.
  *
  * @param string $email
  * @param string $password
  * @return array
  */
 public static function authenticate($email, $password)
 {
     $db = Zend_Registry::get("db");
     $password = md5($password);
     $profile = new MemberProfile();
     $foundUser = $profile->authenticateMember(array('email' => $email, 'password' => $password));
     if (isset($foundUser['member_id'])) {
         return array('success' => 'true', 'member_id' => $foundUser['member_id'], 'email' => $foundUser['email'], 'lastName' => $foundUser['lastName'], 'firstName' => $foundUser['firstName'], 'status' => $foundUser['status']);
     } else {
         return array('success' => 'false');
     }
 }