X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialConfirmEmail.php;h=dc31eba61a00abde61d0dc651c6d8b17c5309a14;hp=f86a133a1325237364098137cdfdd3a6c658c0c7;hb=af80076034fb734d652eb043c523c1d8df974e51;hpb=70e2881cec98b89edc5afebfae55650782937e67 diff --git a/includes/specials/SpecialConfirmEmail.php b/includes/specials/SpecialConfirmEmail.php index f86a133a13..dc31eba61a 100644 --- a/includes/specials/SpecialConfirmEmail.php +++ b/includes/specials/SpecialConfirmEmail.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * Special page allows users to request email confirmation message, and handles * processing of the confirmation code when the link in the email is followed @@ -57,7 +59,10 @@ class SpecialConfirmEmail extends UnlistedSpecialPage { // This could also let someone check the current email address, so // require both permissions. - if ( !$this->getUser()->isAllowed( 'viewmyprivateinfo' ) ) { + if ( !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $this->getUser(), 'viewmyprivateinfo' ) + ) { throw new PermissionsError( 'viewmyprivateinfo' ); } @@ -136,7 +141,7 @@ class SpecialConfirmEmail extends UnlistedSpecialPage { return Status::newGood( $this->msg( 'confirmemail_sent' )->text() ); } else { return Status::newFatal( new RawMessage( - $status->getWikiText( 'confirmemail_sendfailed' ) + $status->getWikiText( 'confirmemail_sendfailed', false, $this->getLanguage() ) ) ); } }