MediaWiki
REL1_22
|
Shows a generic "user is not logged in" error page. More...
Public Member Functions | |
__construct ($reasonMsg= 'exception-nologin-text', $titleMsg= 'exception-nologin', $params=null) |
Shows a generic "user is not logged in" error page.
This is essentially an ErrorPageError exception which by default uses the 'exception-nologin' as a title and 'exception-nologin-text' for the message.
if( $user->isAnon() ) { throw new UserNotLoggedIn(); }
Note the parameter order differs from ErrorPageError, this allows you to simply specify a reason without overriding the default title.
if( $user->isAnon() ) { throw new UserNotLoggedIn( 'action-require-loggedin' ); }
Definition at line 490 of file Exception.php.
UserNotLoggedIn::__construct | ( | $ | reasonMsg = 'exception-nologin-text' , |
$ | titleMsg = 'exception-nologin' , |
||
$ | params = null |
||
) |
$reasonMsg | A message key containing the reason for the error. Optional, default: 'exception-nologin-text' |
$titleMsg | A message key to set the page title. Optional, default: 'exception-nologin' |
$params | Parameters to wfMessage(). Optional, default: null |
Reimplemented from ErrorPageError.
Definition at line 500 of file Exception.php.
References ErrorPageError\$params.