{"action":"opened","issue":{"url":"https://api.github.com/repos/lametro/programacion-4-2015/issues/62","labels_url":"https://api.github.com/repos/lametro/programacion-4-2015/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/lametro/programacion-4-2015/issues/62/comments","events_url":"https://api.github.com/repos/lametro/programacion-4-2015/issues/62/events","html_url":"https://github.com/lametro/programacion-4-2015/issues/62","id":121739095,"number":62,"title":"Problemas en login","user":{"login":"rodriherreria","id":13700507,"avatar_url":"https://avatars.githubusercontent.com/u/13700507?v=3","gravatar_id":"","url":"https://api.github.com/users/rodriherreria","html_url":"https://github.com/rodriherreria","followers_url":"https://api.github.com/users/rodriherreria/followers","following_url":"https://api.github.com/users/rodriherreria/following{/other_user}","gists_url":"https://api.github.com/users/rodriherreria/gists{/gist_id}","starred_url":"https://api.github.com/users/rodriherreria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodriherreria/subscriptions","organizations_url":"https://api.github.com/users/rodriherreria/orgs","repos_url":"https://api.github.com/users/rodriherreria/repos","events_url":"https://api.github.com/users/rodriherreria/events{/privacy}","received_events_url":"https://api.github.com/users/rodriherreria/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-11T16:11:54Z","updated_at":"2015-12-11T16:11:54Z","closed_at":null,"body":"Catriel, surgio un problema de la nada, no podemos entrar nos salta error en el login, hace 1 hora nos funcionaba bien y no tocamos nada del login y funciona todo los demas (crear usuario, ver anuncios, etc)\r\nProbamos lo que le paso a los otros chicos del codigo y no funciona tampoco. #52 \r\n\r\nasi es nuestro codigo\r\n\r\n```php \r\n\r\n$app->post('/login', function () use ($app) {\r\n\t$input = $app->request->getBody();\r\n\r\n\t$email = $input['email'];\r\n\tif(empty($email)){\r\n\t\t$app->render(500,array(\r\n\t\t\t'error' => TRUE,\r\n            'msg'   => 'Se requiere el Email',\r\n        ));\r\n\t}\r\n\t$password = $input['password'];\r\n\tif(empty($password)){\r\n\t\t$app->render(500,array(\r\n\t\t\t'error' => TRUE,\r\n            'msg'   => 'Se requiere la Contraseña',\r\n        ));\r\n\t}\r\n\t$db = $app->db->getConnection();\r\n\t$user = $db->table('users')->select()->where('email', $email)->first();\r\n\tif(empty($user)){\r\n\t\t$app->render(500,array(\r\n\t\t\t'error' => TRUE,\r\n            'msg'   => 'El usuario no existe',\r\n        ));\r\n\t}\r\n\tif($user->password != $password){\r\n\t\t$app->render(500,array(\r\n\t\t\t'error' => TRUE,\r\n            'msg'   => 'La password no coincide',\r\n        ));\r\n\t}\r\n\r\n\t$token = simple_encrypt($user->id, $app->enc_key);\r\n\r\n\t$app->render(200,array('token' => $token));\r\n});\r\n\r\n```\r\n\r\n![image](https://cloud.githubusercontent.com/assets/13700507/11748663/0e5a79d4-a008-11e5-9f69-c26cb2f7c90c.png)\r\n\r\neste es el repo https://github.com/rodriherreria/api-geoalquiler\r\n"}}