X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialChangeEmail.php;h=eae8e3a1483f461cc788978d43022c9a6c9d6ac6;hb=21b7b27f0379cff1b06efa95d27fa88684b65c57;hp=0996de34c46b094f7675cca596c4b9248ae29caa;hpb=37683c7ca08f40745ce79f6b6cbbc73b6d1cb3b1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php index 0996de34c4..eae8e3a148 100644 --- a/includes/specials/SpecialChangeEmail.php +++ b/includes/specials/SpecialChangeEmail.php @@ -154,7 +154,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage { 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( @@ -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,8 @@ class SpecialChangeEmail extends UnlistedSpecialPage { $user->saveSettings(); + $wgAuth->updateExternalDB( $user ); + return $status->value; } }