add toggle to disable regs

This commit is contained in:
2018-07-29 21:24:53 +02:00
parent 886c65b28e
commit 8047a0487f
8 changed files with 103 additions and 55 deletions
+4
View File
@@ -32,6 +32,10 @@ function _loginVia($method) {
// update user name first time user logs in
if (!$user->exists) {
if (!config('app.allow_regs')) {
abort(403, "Registrations are closed.");
}
$basename = $details->nickname ?: ($details->full_name ?: $details->email);
$user->name = $basename;
$cnt = 1;