Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 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
  9. a valid email address"));
  10. }
  11. $password = $this->_getParam('password' , "");
  12. $mapperUser = RCS_Resource::get('Db_Mapper_User_Custom');
  13. $user = $mapperUser->findByEmailID($emailId[0]->getId());
  14. if(count($user) == 0 ){
  15. $this->_helper->redirector->gotoSimple('index','login',null, array('error' => "No User Found"));
  16.  
  17. }elseif($password != $user->getPassword()){
  18. $this->_helper->redirector->gotoSimple('index','login',null, array('error' => "Incorrect Password"));
  19.  
  20. }else{
  21. $this->_helper->redirector->gotoSimple('list','user');
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement