MediaWiki  REL1_22
UserNotLoggedIn Class Reference

Shows a generic "user is not logged in" error page. More...

Inheritance diagram for UserNotLoggedIn:
Collaboration diagram for UserNotLoggedIn:

List of all members.

Public Member Functions

 __construct ($reasonMsg= 'exception-nologin-text', $titleMsg= 'exception-nologin', $params=null)

Detailed Description

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.

See also:
bug 37627
Since:
1.20
Example:
 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.

Example:
 if( $user->isAnon() ) {
    throw new UserNotLoggedIn( 'action-require-loggedin' );
 }

Definition at line 490 of file Exception.php.


Constructor & Destructor Documentation

UserNotLoggedIn::__construct ( reasonMsg = 'exception-nologin-text',
titleMsg = 'exception-nologin',
params = null 
)
Parameters:
$reasonMsgA message key containing the reason for the error. Optional, default: 'exception-nologin-text'
$titleMsgA message key to set the page title. Optional, default: 'exception-nologin'
$paramsParameters to wfMessage(). Optional, default: null

Reimplemented from ErrorPageError.

Definition at line 500 of file Exception.php.

References ErrorPageError\$params.


The documentation for this class was generated from the following file: