Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function checkUserAuth(){
- $em = $this->getDoctrine()->getManager();
- $session = new Session();
- $repository = $em->getRepository('LoginLoginBundle:Users');
- if($session->has('login')){
- $login = $session->get('login');
- $email = $login->getEmail();
- $password = $login->getPassword();
- $user = $repository->findOneBy(array('email' => $email, 'password' => $password));
- if ($user) {
- $this->_commonOptions['userName'] = $user->getName();
- return true;
- }
- else
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement