Esempio n. 1
0
 /**
  * Login Attempt 
  * 
  * @param $username String Username, Email, or Contact ID used for login
  * @param $password String Password for login
  * 
  * @return array An Array containing the results of the login attempt
  */
 public function login($username, $password)
 {
     $success = LP_Employee::login($username, $password);
     if ($success) {
         return array('success' => true);
     } else {
         return array('success' => false, 'error' => LP_Employee::$loginError);
     }
 }
Esempio n. 2
0
 /**
  * Returns a list of this lender's notices
  * 
  * @param int $lenderid Lender's ID
  * @param int $limit Number of notices to return
  * 
  * @return array An Array containing notices
  */
 public function getNotices($lenderID, $limit = 25)
 {
     $lenderID = (int) $lenderID;
     $contactID = LP_Employee::getContactID();
     return Zend_Db_Table::getDefaultAdapter()->select()->from(array('n' => 'notices'))->joinLeft(array('l' => 'lender_loan_product'), "l.lenderid = n.lenderid")->joinLeft(array('en' => 'employee_notice'), "en.notice_id = n.notices_id AND en.contact_id = {$contactID}")->joinLeft(array('ens' => 'employee_notice_status'), "ens.employee_notice_status_id = en.employee_notice_status_id")->where('n.lenderid = ?', $lenderID)->limit($limit)->query()->fetchAll();
 }