Linker: Inline deprecated User::canSendEmail()
Change-Id: I3bc1ab3fa24ccec8e2c9643e50c31667ba71cef0
This commit is contained in:
parent
0bf0b4d118
commit
22fd28def5
1 changed files with 7 additions and 2 deletions
|
|
@ -1300,8 +1300,13 @@ class Linker {
|
|||
$items[] = self::blockLink( $userId, $userText );
|
||||
}
|
||||
|
||||
$user = RequestContext::getMain()->getUser();
|
||||
if ( $addEmailLink && $user->canSendEmail() ) {
|
||||
if (
|
||||
$addEmailLink
|
||||
&& MediaWikiServices::getInstance()->getEmailUserFactory()
|
||||
->newEmailUser( RequestContext::getMain()->getAuthority() )
|
||||
->canSend()
|
||||
->isGood()
|
||||
) {
|
||||
$items[] = self::emailLink( $userId, $userText );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue