Auth changed to firstname lastname schema

This commit is contained in:
Torsten 2017-08-01 14:33:22 +02:00
parent 64e4959884
commit 3f17c76403
11 changed files with 45 additions and 35 deletions

View file

@ -18,7 +18,10 @@ class SessionsController extends Controller
public function store() {
// Attempt to authenticate the user
if (!auth()->attempt(request(['name','password']))) {
$name=request('firstname')." ".request('lastname');
$password=request('password');
if (!auth()->attempt(['name'=>$name, 'password'=>$password])) {
return back()->withErrors(['message'=>'Bitte Logindaten prüfen und nochmal versuchen.']);
}