Replace use of deprecated User::isBlockedFromEmailuser()
Change-Id: Ic03e63d4585416fa60f602b3d42faaafe8559118
这个提交包含在:
父节点
8e3a7b3c93
当前提交
734a795fc3
|
@ -157,17 +157,16 @@ class SpecialContact extends UnlistedSpecialPage {
|
|||
}
|
||||
|
||||
// Blocked users cannot use the contact form if they're disabled from sending email.
|
||||
if ( $user->isBlockedFromEmailuser() ) {
|
||||
$block = $user->getBlock();
|
||||
if ( $block && $block->appliesToRight( 'sendemail' ) ) {
|
||||
$useCustomBlockMessage = $config['UseCustomBlockMessage'] ?? false;
|
||||
if ( $useCustomBlockMessage ) {
|
||||
$this->getOutput()->showErrorPage( $this->getFormSpecificMessageKey( 'contactpage-title' ),
|
||||
$this->getFormSpecificMessageKey( 'contactpage-blocked-message' ) );
|
||||
return;
|
||||
} else {
|
||||
// If the user is blocked from emailing users then there is a block
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
throw new UserBlockedError( $this->getUser()->getBlock() );
|
||||
}
|
||||
|
||||
throw new UserBlockedError( $block );
|
||||
}
|
||||
|
||||
$this->getOutput()->setPageTitleMsg(
|
||||
|
|
正在加载...
在新工单中引用