X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialChangePassword.php;h=41b3b2558f746d90d43197a8d61474ac996f828b;hb=66d0bc0527f6c04495be1605e5a28b9e7a8c033e;hp=2b883258032ab7a095add8b0ceb56535efbf6ebc;hpb=5600c147ed0e8eba237f5a0a262faef94a0b8da1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialChangePassword.php b/includes/specials/SpecialChangePassword.php index 2b88325803..41b3b2558f 100644 --- a/includes/specials/SpecialChangePassword.php +++ b/includes/specials/SpecialChangePassword.php @@ -37,7 +37,9 @@ class SpecialChangePassword extends UnlistedSpecialPage { function execute( $par ) { global $wgAuth; - $this->checkReadOnly(); + $this->setHeaders(); + $this->outputHeader(); + $this->getOutput()->disallowUserJs(); $request = $this->getRequest(); $this->mUserName = trim( $request->getVal( 'wpName' ) ); @@ -46,10 +48,6 @@ class SpecialChangePassword extends UnlistedSpecialPage { $this->mRetype = $request->getVal( 'wpRetype' ); $this->mDomain = $request->getVal( 'wpDomain' ); - $this->setHeaders(); - $this->outputHeader(); - $this->getOutput()->disallowUserJs(); - $user = $this->getUser(); if( !$request->wasPosted() && !$user->isLoggedIn() ) { $this->error( $this->msg( 'resetpass-no-info' )->text() ); @@ -61,12 +59,11 @@ class SpecialChangePassword extends UnlistedSpecialPage { return; } + $this->checkReadOnly(); + if( $request->wasPosted() && $user->matchEditToken( $request->getVal( 'token' ) ) ) { try { - if ( isset( $_SESSION['wsDomain'] ) ) { - $this->mDomain = $_SESSION['wsDomain']; - } - $wgAuth->setDomain( $this->mDomain ); + $this->mDomain = $wgAuth->getDomain(); if( !$wgAuth->allowPasswordChange() ) { $this->error( $this->msg( 'resetpass_forbidden' )->text() ); return;