Thanks. It is not a specific Doctrine-question. You probably find some solutions when googling around a bit. I just searched very short and found:
- this video, part 2: http://www.youtube.com/watch?v=7ALPCIODQRg (part 1: http://www.youtube.com/watch?v=F25xObacb4o ) - http://samsonasik.wordpress.com/2012/10/23/zend-framework-2-create-login-authentication-using-authenticationservice-with-rememberme/ - http://www.phpriot.com/articles/zend-session/5 Hope that helps. Otherwise, search more thoroughly. I after that you have any Doctrine-related questions, you are very welcome here! *- Herman* On Thursday, 6 February 2014 09:59:06 UTC+1, [email protected] wrote: > > I am using MongoDB with zf2, if there is some ready made solution its > great but if not examples or hints to start writing such code is also > appreciable. > > On Thursday, 6 February 2014 13:26:40 UTC+5, Herman Peeren wrote: >> >> *What* exactly *is* your (Doctrine related) *question*? >> >> Do you want hints or examples about how to start writing such code? Do >> you have a problem persisting a user token in a cookie? Or are you seaching >> a ready-made solution? AFAIK the answer to the last question is: not in >> Doctrine. Doctrine is about persisting the data in your model. >> >> BTW, just curious: what ODM do you use? MongoDB? OrientDB? PHPCR? Other? >> And do you use this with Zend Framework? >> >> *- Herman* >> >> On Thursday, 6 February 2014 07:31:58 UTC+1, Muhammad Shahbaz wrote: >>> >>> >>> 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.
