{"action":"opened","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/19053","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/19053/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/19053/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/19053/events","html_url":"https://github.com/laravel/framework/issues/19053","id":226265576,"number":19053,"title":"Auth login not working well","user":{"login":"simoebenhida","id":19809072,"avatar_url":"https://avatars2.githubusercontent.com/u/19809072?v=3","gravatar_id":"","url":"https://api.github.com/users/simoebenhida","html_url":"https://github.com/simoebenhida","followers_url":"https://api.github.com/users/simoebenhida/followers","following_url":"https://api.github.com/users/simoebenhida/following{/other_user}","gists_url":"https://api.github.com/users/simoebenhida/gists{/gist_id}","starred_url":"https://api.github.com/users/simoebenhida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simoebenhida/subscriptions","organizations_url":"https://api.github.com/users/simoebenhida/orgs","repos_url":"https://api.github.com/users/simoebenhida/repos","events_url":"https://api.github.com/users/simoebenhida/events{/privacy}","received_events_url":"https://api.github.com/users/simoebenhida/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-04T12:31:41Z","updated_at":"2017-05-04T12:31:41Z","closed_at":null,"body":"- Laravel Version: #.#.#\r\n- PHP Version:\r\n- Database Driver & Version:\r\n\r\nWhen i try to login i need to input the data twice to login in.\r\nbut when i put the same data that i put already when i were login in it works good . but when i put new data i need to put it twice again ...\r\n\r\n`public function connection_etudiant(Request $request)\r\n  {\r\n  $validator = Validator::make($request->all(),[\r\n    'mot_cle' => 'required',\r\n    'cne' => 'required',\r\n  ]);\r\n  if($validator->fails())\r\n  {\r\n    return redirect()->back()->withErrors($validator)->withInput();\r\n  }\r\n  $check_mot_cle = platform::where('mot_cle',$request->mot_cle)->first();\r\n  if($check_mot_cle == null)\r\n  {\r\n    Session::flash('Student_Failed','Ce Mot Clé n\\'existe pas');\r\n    return redirect()->back()->withInput();\r\n  }\r\n  $check_student = Etudiant::where('cne',$request->cne)->count();\r\n  $student = Etudiant::where('cne',$request->cne)->first();\r\n  if($check_student > 0)\r\n  {\r\n    $user = User::find($request->cne);\r\n    if(!$user)\r\n    {\r\n      $user = new User;\r\n      $user->id = $request->cne;\r\n      $user->prof = 0;\r\n      $user->nom = $student->nom;\r\n      $user->mot_cle = $request->mot_cle;\r\n      $user->prenom = $student->prenom;\r\n      $user->password = bcrypt($request->cne);\r\n      $user->save();\r\n      Auth::login($user);\r\n      return redirect()->route('home');\r\n    }\r\n    else {\r\n      $user->mot_cle = $request->mot_cle;\r\n      $user->update();\r\n      Auth::login($user);\r\n      return redirect()->route('home');\r\n    }\r\n  }else {\r\n    Session::flash('Student_Failed','CNE ou mot Clé incorrect');\r\n    return redirect()->back()->withInput();\r\n  }\r\n}`\r\n"}}
{"actor":{"display_login":"simoebenhida"}}