i will try to make the method shorter ,  return new Response will return a
response , i want to return a JsonResponse , but i will do it too , Galaxy
S3 is just a String as an example , it will be handled later when we are
able to know the device type through a code , i will be replacing this one

best regards ,
maisara farahat


On Thu, Apr 24, 2014 at 3:02 PM, Almgohar <notifications@github.com> wrote:

> In
> Entangle/entangle-symfony/public/src/entangle/src/Megasoft/EntangleBundle/Controller/UserController.php:
>
> > +            $response->setStatusCode(400, "name has special characters");
> > +            return $response;
> > +        }
> > +        $sessionId = $this->generateSessionId(30);
> > +
> > +        $repo = $this->getDoctrine()->getRepository('MegasoftEntangleBundle:User');
> > +        $user = $repo->findOneBy(array('name' => $name, 'password' => $password));
> > +
> > +        $session = new Session();
> > +        $session->setSessionId($sessionId);
> > +        $session->setUser($user);
> > +        $session->setUserId($user->getId());
> > +        $session->setCreated(new \DateTime('tomorrow'));
> > +        $session->setExpired(0);
> > +        $session->setRegId("ToAvoidNull");
> > +        $session->setDeviceType("Galaxy S3");
>
> @maisaraFarahat <https://github.com/maisaraFarahat> Shouldn't this be
> based on all different devices used, not just "Galaxy S3"
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/ndomar/megasoft-14/pull/285/files#r11947433>
> .
>