mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 19:59:18 -08:00
Automatically log the user in after user creation
This commit is contained in:
parent
0d6b160b61
commit
81a0e06c40
|
@ -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!');
|
||||
|
|
Loading…
Reference in a new issue