38 parent::__construct(
'ChangeEmail',
'editmyprivateinfo' );
49 return AuthManager::singleton()->allowsPropertyChange(
'emailaddress' );
60 $out->disallowUserJs();
67 if ( !AuthManager::singleton()->allowsPropertyChange(
'emailaddress' ) ) {
75 if ( !$this->
getUser()->isAllowed(
'viewmyprivateinfo' ) ) {
79 parent::checkExecutePermissions( $user );
88 'label-message' =>
'username',
89 'default' =>
$user->getName(),
93 'label-message' =>
'changeemail-oldemail',
94 'default' =>
$user->getEmail() ?: $this->
msg(
'changeemail-none' )->text(),
98 'label-message' =>
'changeemail-newemail',
100 'help-message' =>
'changeemail-newemail-help',
112 $form->
setId(
'mw-changeemail-form' );
131 $returnto =
$request->getVal(
'returnto' );
133 if ( !$titleObj instanceof
Title ) {
138 if ( $this->status->value ===
true ) {
140 } elseif ( $this->status->value ===
'eauth' ) {
141 # Notify user that a confirmation email has been sent...
142 $this->
getOutput()->wrapWikiMsg(
"<div class='error' style='clear: both;'>\n$1\n</div>",
155 $authManager = AuthManager::singleton();
161 if ( $newaddr === $user->
getEmail() ) {
171 Hooks::run(
'PrefsEmailAudit', [ $user, $oldaddr, $newaddr ] );
getEmail()
Get the user's e-mail address.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
the array() calling protocol came about after MediaWiki 1.4rc1.
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
saveSettings()
Save this user's settings into the database.
static newMainPage()
Create a new Title for the Main Page.
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
static newFatal($message)
Factory function for fatal errors.
isGood()
Returns whether the operation completed and didn't have any error or warnings.
checkExecutePermissions(User $user)
msg()
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
Let users change their email address.
static newFromText($text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
Special page which uses an HTMLForm to handle processing.
setEmailWithConfirmation($str)
Set the user's e-mail address and a confirmation mail if needed.
attemptChange(User $user, $newaddr)
wfCgiToArray($query)
This is the logical opposite of wfArrayToCgi(): it accepts a query string as its argument and returns...
An error page which can definitely be safely rendered using the OutputPage.