MediaWiki  REL1_24
SpecialChangePassword Class Reference

Let users recover their password. More...

Inheritance diagram for SpecialChangePassword:
Collaboration diagram for SpecialChangePassword:

List of all members.

Public Member Functions

 __construct ()
 execute ($par)
 Main execution point.
 onSubmit (array $data)
 Process the form on POST submission.
 onSuccess ()
 Do something exciting on successful processing of the form, most likely to show a confirmation message.
 requiresUnblock ()
 Whether this action cannot be executed by a blocked user.
 setChangeMessage (Message $msg)
 Set a message at the top of the Change Password form.
 setOldPasswordMessage ($msg)
 Set a message at the top of the Change Password form.

Protected Member Functions

 alterForm (HTMLForm $form)
 Play with the HTMLForm if you need to more substantially.
 attemptReset ($oldpass, $newpass, $retype)
 checkExecutePermissions (User $user)
 Called from execute() to check if the given user can perform this action.
 getFormFields ()
 Get an HTMLForm descriptor array.
 getGroupName ()
 Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Protected Attributes

 $mDomain
 $mOldPassMsg = null
 $mPreTextMessage = null
 $mUserName

Detailed Description

Let users recover their password.

Definition at line 29 of file SpecialChangePassword.php.


Constructor & Destructor Documentation


Member Function Documentation

SpecialChangePassword::attemptReset ( oldpass,
newpass,
retype 
) [protected]
Parameters:
string$oldpass
string$newpass
string$retype
Exceptions:
PasswordErrorWhen cannot set the new password because requirements not met.

Definition at line 238 of file SpecialChangePassword.php.

References $abortMsg, $e, $user, array(), LoginForm\clearLoginThrottle(), SpecialPage\getConfig(), SpecialPage\getLanguage(), SpecialPage\getRequest(), SpecialPage\getUser(), LoginForm\incLoginThrottle(), SpecialPage\msg(), User\newFromName(), text, and wfRunHooks().

Referenced by onSubmit().

Called from execute() to check if the given user can perform this action.

Failures here must throw subclasses of ErrorPageError.

Parameters:
User$user
Exceptions:
UserBlockedError
Returns:
bool True

Reimplemented from FormSpecialPage.

Definition at line 54 of file SpecialChangePassword.php.

References SpecialPage\getRequest(), and SpecialPage\requireLogin().

Main execution point.

Parameters:
string | null$par

Reimplemented from FormSpecialPage.

Definition at line 48 of file SpecialChangePassword.php.

References FormSpecialPage\$par, and SpecialPage\getOutput().

Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Returns:
string
Since:
1.21

Reimplemented from SpecialPage.

Definition at line 311 of file SpecialChangePassword.php.

Process the form on POST submission.

Parameters:
array$data
HTMLForm$form
Returns:
bool|string|array|Status As documented for HTMLForm::trySubmit.

Reimplemented from FormSpecialPage.

Definition at line 164 of file SpecialChangePassword.php.

References $e, $query, attemptReset(), LoginForm\getLoginToken(), SpecialPage\getName(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getUser(), global, Title\newFromText(), and Title\newMainPage().

Do something exciting on successful processing of the form, most likely to show a confirmation message.

Since:
1.22 Default is to do nothing

Reimplemented from FormSpecialPage.

Definition at line 208 of file SpecialChangePassword.php.

References array(), SpecialPage\getContext(), LoginForm\getLoginToken(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getUser(), and LoginForm\setLoginToken().

Whether this action cannot be executed by a blocked user.

Returns:
bool

Reimplemented from FormSpecialPage.

Definition at line 307 of file SpecialChangePassword.php.

Set a message at the top of the Change Password form.

Since:
1.23
Parameters:
Message$msgMessage to parse and add to the form header

Definition at line 67 of file SpecialChangePassword.php.

Set a message at the top of the Change Password form.

Since:
1.23
Parameters:
string$msgMessage label for old/temp password field

Definition at line 76 of file SpecialChangePassword.php.


Member Data Documentation

SpecialChangePassword::$mDomain [protected]

Definition at line 31 of file SpecialChangePassword.php.

SpecialChangePassword::$mOldPassMsg = null [protected]

Definition at line 37 of file SpecialChangePassword.php.

SpecialChangePassword::$mPreTextMessage = null [protected]

Definition at line 34 of file SpecialChangePassword.php.

SpecialChangePassword::$mUserName [protected]

Definition at line 30 of file SpecialChangePassword.php.


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