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.

Reply via email to