]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/EmailConfirmationService.php
Update settings.php
[bookstack] / app / Auth / Access / EmailConfirmationService.php
index a9aecaf22a13fed0dfbd86ef8627b68403eacef1..9aa3b9b98b56cf0d56453ae9e2de18c48c4d4524 100644 (file)
@@ -27,4 +27,13 @@ class EmailConfirmationService extends UserTokenService
         $user->notify(new ConfirmEmail($token));
     }
 
+    /**
+     * Check if confirmation is required in this instance.
+     * @return bool
+     */
+    public function confirmationRequired() : bool
+    {
+        return setting('registration-confirmation')
+            || setting('registration-restrict');
+    }
 }