summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialChangeEmail.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/specials/SpecialChangeEmail.php
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/specials/SpecialChangeEmail.php')
-rw-r--r--includes/specials/SpecialChangeEmail.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php
index fc726106..59a02578 100644
--- a/includes/specials/SpecialChangeEmail.php
+++ b/includes/specials/SpecialChangeEmail.php
@@ -151,10 +151,10 @@ class SpecialChangeEmail extends UnlistedSpecialPage {
$items = array(
array( 'wpName', 'username', 'text', $user->getName() ),
array( 'wpOldEmail', 'changeemail-oldemail', 'text', $oldEmailText ),
- array( 'wpNewEmail', 'changeemail-newemail', 'input', $this->mNewEmail ),
+ array( 'wpNewEmail', 'changeemail-newemail', 'email', $this->mNewEmail ),
);
if ( $wgRequirePasswordforEmailChange ) {
- $items[] = array( 'wpPassword', 'yourpassword', 'password', $this->mPassword );
+ $items[] = array( 'wpPassword', 'changeemail-password', 'password', $this->mPassword );
}
$this->getOutput()->addHTML(
@@ -195,7 +195,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage {
if ( $type != 'text' ) {
$out .= Xml::label( $this->msg( $label )->text(), $name );
} else {
- $out .= $this->msg( $label )->escaped();
+ $out .= $this->msg( $label )->escaped();
}
$out .= "</td>\n";
$out .= "\t<td class='mw-input'>";
@@ -213,6 +213,8 @@ class SpecialChangeEmail extends UnlistedSpecialPage {
* @return bool|string true or string on success, false on failure
*/
protected function attemptChange( User $user, $pass, $newaddr ) {
+ global $wgAuth;
+
if ( $newaddr != '' && !Sanitizer::validateEmail( $newaddr ) ) {
$this->error( 'invalidemailaddress' );
return false;
@@ -248,6 +250,12 @@ class SpecialChangeEmail extends UnlistedSpecialPage {
$user->saveSettings();
+ $wgAuth->updateExternalDB( $user );
+
return $status->value;
}
+
+ protected function getGroupName() {
+ return 'users';
+ }
}