X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialChangePassword.php;h=41b3b2558f746d90d43197a8d61474ac996f828b;hb=3f9da9d55e47b29ff753872b0883821e026b2782;hp=b30605b7e1d8331240540dcd5bec58ae4caf003c;hpb=5446238520cceb067792338cdfc83a343b480e15;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialChangePassword.php b/includes/specials/SpecialChangePassword.php index b30605b7e1..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,6 +59,8 @@ class SpecialChangePassword extends UnlistedSpecialPage { return; } + $this->checkReadOnly(); + if( $request->wasPosted() && $user->matchEditToken( $request->getVal( 'token' ) ) ) { try { $this->mDomain = $wgAuth->getDomain();