]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/register.php
Got photos displaying in the feed *the right way*
[quix0rs-gnu-social.git] / actions / register.php
index 9b8161e0824dd0c2b872c54a6be5abd886345009..7307bc689b26cda56839fbadfb4ada3992bbe14d 100644 (file)
@@ -74,6 +74,13 @@ class RegisterAction extends Action
         parent::prepare($args);
         $this->code = $this->trimmed('code');
 
+        // @todo this check should really be in index.php for all sensitive actions
+        $ssl = common_config('site', 'ssl');
+        if (empty($_SERVER['HTTPS']) && ($ssl == 'always' || $ssl == 'sometimes')) {
+            common_redirect(common_local_url('register'));
+            // exit
+        }
+
         if (empty($this->code)) {
             common_ensure_session();
             if (array_key_exists('invitecode', $_SESSION)) {