Go to the documentation of this file.
55 parent::__construct(
'PasswordReset',
'editmyprivateinfo' );
59 if ( $this->passwordReset ===
null ) {
79 parent::checkExecutePermissions(
$user );
83 $resetRoutes = $this->
getConfig()->get(
'PasswordResetRoutes' );
85 if ( isset( $resetRoutes[
'username'] ) && $resetRoutes[
'username'] ) {
88 'label-message' =>
'passwordreset-username',
91 if ( $this->
getUser()->isLoggedIn() ) {
92 $a[
'Username'][
'default'] = $this->
getUser()->getName();
96 if ( isset( $resetRoutes[
'email'] ) && $resetRoutes[
'email'] ) {
99 'label-message' =>
'passwordreset-email',
111 $resetRoutes = $this->
getConfig()->get(
'PasswordResetRoutes' );
116 if ( isset( $resetRoutes[
'username'] ) && $resetRoutes[
'username'] ) {
119 if ( isset( $resetRoutes[
'email'] ) && $resetRoutes[
'email'] ) {
123 $message = ( $i > 1 ) ?
'passwordreset-text-many' :
'passwordreset-text-one';
139 $username = isset( $data[
'Username'] ) ? $data[
'Username'] :
null;
140 $email = isset( $data[
'Email'] ) ? $data[
'Email'] :
null;
142 $this->method =
$username ?
'username' :
'email';
146 if ( $this->result->hasMessage(
'actionthrottledtext' ) ) {
154 if ( $this->method ===
'email' ) {
155 $this->
getOutput()->addWikiMsg(
'passwordreset-emailsentemail' );
157 $this->
getOutput()->addWikiMsg(
'passwordreset-emailsentusername' );
169 return parent::isListed();
Special page for requesting a password reset email.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getOutput()
Get the OutputPage being used for this instance.
isListed()
Hide the password reset page if resets are disabled.
doesWrites()
Indicates whether this special page may perform database writes.
getFormFields()
Get an HTMLForm descriptor array.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist and Watchlist you will want to construct new ChangesListBooleanFilter or ChangesListStringOptionsFilter objects When constructing you specify which group they belong to You can reuse existing or create your you must register them with $special registerFilterGroup removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set $status
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Special page which uses an HTMLForm to handle processing.
getDisplayFormat()
Get display format for the form.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Generic operation result class Has warning/error list, boolean status and arbitrary value.
getConfig()
Shortcut to get main config object.
onSubmit(array $data)
Process the form.
PasswordReset $passwordReset
static wrap( $sv)
Succinct helper method to wrap a StatusValue.
execute( $par)
Basic SpecialPage workflow: get a form, send it to the user; get some data back,.
string[] $passwords
Temporary storage for the passwords which have been sent out, keyed by username.
Show an error when the user hits a rate limit.
checkExecutePermissions(User $user)
Called from execute() to check if the given user can perform this action.
getUser()
Shortcut to get the User executing this instance.
onSuccess()
Do something exciting on successful processing of the form, most likely to show a confirmation messag...
msg()
Wrapper around wfMessage that sets the current context.
getRequest()
Get the WebRequest being used for this instance.
userCanExecute(User $user)
Checks if the given user (identified by an object) can execute this special page (as defined by $mRes...
alterForm(HTMLForm $form)
Play with the HTMLForm if you need to more substantially.
An error page which can definitely be safely rendered using the OutputPage.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
this hook is for auditing only or null if authentication failed before getting that far $username
Helper class for the password reset functionality shared by the web UI and the API.
the array() calling protocol came about after MediaWiki 1.4rc1.