]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
newmessage (and Message class) fixed for FormAction
[quix0rs-gnu-social.git] / lib / action.php
index e4bd0746a59522498e3610e494496846ccde0e8a..09a15a4435a80d41985d64d2c1bc86347ebd7f41 100644 (file)
@@ -1376,6 +1376,18 @@ class Action extends HTMLOutputter // lawsuit
         throw new ClientException($msg, $code);
     }
 
+    /**
+     * Redirect to login page (with returnto)
+     *
+     * @return nothing
+     */
+    function needLogin()
+    {
+        // this might be updated with a login check before redirecting
+        common_set_returnto($_SERVER['REQUEST_URI']);
+        common_redirect(common_local_url('login'));
+    }
+
     /**
      * Returns the current URL
      *