Last modified: 2012-07-31 09:49:08 UTC
We have several special pages checking if the user is not logged in and then craft their own error page. A recent change in an extension adds yet another implementation: https://gerrit.wikimedia.org/r/#/c/11169/ https://gerrit.wikimedia.org/r/#/c/11169/1/special/SpecialOATH.php,unified We would need a generic exception to be thrown whenever the user is anonymous. So we could just: if ( $this->getUser()->isAnon() ) { throw new NeedLogguedInError( ); } With a nice default message such as: "Sorry the action or page you requested is restricted to logged in users".
https://gerrit.wikimedia.org/r/12578
Change got merged: RELEASE-NOTE-1.20: * UserNotLoggedIn() exception to show a generic error page whenever a user is not logged in