* @ingroup SpecialPage
*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Preferences\MultiUsernameFilter;
/**
* A special page that allows users to send e-mails to other users
}
if ( $sender !== null ) {
- $blacklist = $target->getOption( 'email-blacklist', [] );
+ $blacklist = $target->getOption( 'email-blacklist', '' );
if ( $blacklist ) {
+ $blacklist = MultiUsernameFilter::splitIds( $blacklist );
$lookup = CentralIdLookup::factory();
$senderId = $lookup->centralIdFromLocalUser( $sender );
if ( $senderId !== 0 && in_array( $senderId, $blacklist ) ) {
*
* @param User $user
* @param string $editToken Edit token
- * @param Config $config optional for backwards compatibility
+ * @param Config|null $config optional for backwards compatibility
* @return string|null Null on success or string on error
*/
public static function getPermissionsError( $user, $editToken, Config $config = null ) {
Html::label(
$this->msg( 'emailusername' )->text(),
'emailusertarget'
- ) . ' ' .
+ ) . "\u{00A0}" .
Html::input(
'target',
$name,