I have a login form in which is working fine now i want to have remember me
check box on login form , i m doing the authentication in the following way.

if ($loginForm->isValid()){
            $data = $loginForm->getData();
            $authService = $this->getServiceLocator()
                        ->get('doctrine.authenticationservice.odm_default');

            $adapter = $authService->getAdapter();
            $adapter->setIdentityValue($data['email']);  // i am using email
            $adapter->setCredentialValue($data['password']);
            $authResult = $authService->authenticate();

            if ($authResult->isValid()) {
                return $this->redirect()->toRoute('home'); // or last
viewed page
            }

            return array(
                'loginForm' => $loginForm,
                'errors' => 'Email or password is not valid',
            );

            $this->redirect()->toRoute('home');
        }
    }

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to