]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/EmailConfirmationService.php
Refactored confirm actions to their own controller
[bookstack] / app / Auth / Access / EmailConfirmationService.php
index a9aecaf22a13fed0dfbd86ef8627b68403eacef1..a94c54d19b4258c7e6fd771c4fdf71c9aa11df1a 100644 (file)
@@ -27,4 +27,14 @@ 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');
+    }
+
 }