]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/register.php
Added configuration option to only allow OpenID logins.
[quix0rs-gnu-social.git] / actions / register.php
index dcbbbdb6a6de9afb238715b7ff1cac3d78f40b7d..046a76b80ed0ce989e076b9d4eac1f9b6ed56072 100644 (file)
@@ -116,6 +116,8 @@ class RegisterAction extends Action
      *
      * Checks if registration is closed and shows an error if so.
      *
+     * Checks if only OpenID is allowed and redirects to openidlogin if so.
+     *
      * @param array $args $_REQUEST data
      *
      * @return void
@@ -127,6 +129,8 @@ class RegisterAction extends Action
 
         if (common_config('site', 'closed')) {
             $this->clientError(_('Registration not allowed.'));
+        } else if (common_config('site', 'openidonly')) {
+            common_redirect(common_local_url('openidlogin'));
         } else if (common_logged_in()) {
             $this->clientError(_('Already logged in.'));
         } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {