Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function loginProcessAction()
- {
- $email = $this->_getParam('email' , "");
- /* @var $mapperEmail Db_Mapper_Email*/
- $mapperEmail = RCS_Resource::get('Db_Mapper_Email');
- $emailId = $mapperEmail->findByEmail($email);
- if(count($emailId)== 0){
- $this->_helper->redirector->gotoSimple('index','login',null, array('error' => "No user found please enter a valid email address"));
- }
- $password = $this->_getParam('password' , "");
- $mapperUser = RCS_Resource::get('Db_Mapper_User_Custom');
- $user = $mapperUser->findByEmailID($emailId[0]->getId());
- if(count($user) == 0 ){
- $this->_helper->redirector->gotoSimple('index','login',null, array('error' => "No User Found"));
- }elseif($password != $user->getPassword()){
- $this->_helper->redirector->gotoSimple('index','login',null, array('error' => "Incorrect Password"));
- }else{
- $this->_helper->redirector->gotoSimple('list','user');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement