From 81a0e06c40e51a5e012163c42156ba9e0e2e4281 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 29 Nov 2016 01:19:25 -0800 Subject: [PATCH] Automatically log the user in after user creation --- app/Http/Controllers/SettingsController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 77f191f60b..8d58d3a4e6 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -15,6 +15,7 @@ use Response; use Artisan; use Crypt; use Mail; +use Auth; use App\Models\User; use App\Http\Requests\SetupUserRequest; @@ -184,6 +185,7 @@ class SettingsController extends Controller return redirect()->back()->withInput()->withErrors($user->getErrors())->withErrors($settings->getErrors()); } else { $user->save(); + Auth::login($user, true); $settings->save(); if (Input::get('email_creds')=='1') { @@ -195,6 +197,7 @@ class SettingsController extends Controller } + return redirect()->route('setup.done'); } @@ -224,6 +227,7 @@ class SettingsController extends Controller */ public function getSetupDone() { + return View::make('setup/done') ->with('step', 4) ->with('section', 'Done!');