mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-09 05:54:34 +02:00
Control & Promote administrator status via a method rather than a prop
This commit is contained in:
@ -56,7 +56,7 @@ class SocialiteController extends Controller
|
||||
if (User::where('email', $socialiteEmail)->exists()) {
|
||||
return redirect('/error?err=sso_email_already_used');
|
||||
} elseif (User::count() === 0) {
|
||||
$user->is_admin = true;
|
||||
$user->promoteToAdministrator();
|
||||
} elseif (Settings::get('disableRegistration')) {
|
||||
return redirect('/error?err=sso_no_register');
|
||||
}
|
||||
|
Reference in New Issue
Block a user