}
public function userCanExecute( User $user ) {
+ return $this->canChangePassword( $user ) === true && parent::userCanExecute( $user );
+ }
+
+ public function checkExecutePermissions( User $user ) {
$error = $this->canChangePassword( $user );
if ( is_string( $error ) ) {
throw new ErrorPageError( 'internalerror', $error );
- } else if ( !$error ) {
+ } elseif ( !$error ) {
throw new ErrorPageError( 'internalerror', 'resetpass_forbidden' );
}
- return parent::userCanExecute( $user );
+ return parent::checkExecutePermissions( $user );
}
protected function getFormFields() {
$this->getOutput()->addHTML( Html::rawElement( 'pre', array(), $this->email->escaped() ) );
}
-
+
$this->getOutput()->addWikiMsg( 'passwordreset-emailsent' );
$this->getOutput()->returnToMain();
}