Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. public function loginProcessAction()
  2. {
  3. $email = $this->_getParam('email' , "");
  4. /* @var $mapperEmail Db_Mapper_Email*/
  5. $mapperEmail = RCS_Resource::get('Db_Mapper_Email');
  6. $emailId = $mapperEmail->findByEmail($email);
  7. if(count($emailId)== 0){
  8. $this->_helper->redirector->gotoSimple('index','login',null, array('error' => "No user found please enter a valid email address"));
  9. }
  10. $password = $this->_getParam('password' , "");
  11. $mapperUser = RCS_Resource::get('Db_Mapper_User_Custom');
  12. $user = $mapperUser->findByEmailID($emailId[0]->getId());
  13. if(count($user) == 0 ){
  14. $this->_helper->redirector->gotoSimple('index','login',null, array('error' => "No User Found"));
  15.  
  16. }elseif($password != $user->getPassword()){
  17. $this->_helper->redirector->gotoSimple('index','login',null, array('error' => "Incorrect Password"));
  18.  
  19. }else{
  20. $this->_helper->redirector->gotoSimple('list','user');
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement