From c225e3e3edff1ab15126f50cb4fac24cc58ed108 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 25 Jul 2019 12:21:47 +0200 Subject: [PATCH] Include the name of the blacklist matches for disabled users See #2948 --- .../install/files/lib/data/user/User.class.php | 14 ++++++++++++++ wcfsetup/install/lang/de.xml | 2 +- wcfsetup/install/lang/en.xml | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/User.class.php b/wcfsetup/install/files/lib/data/user/User.class.php index a0eee159c3..e167da20fd 100644 --- a/wcfsetup/install/files/lib/data/user/User.class.php +++ b/wcfsetup/install/files/lib/data/user/User.class.php @@ -613,4 +613,18 @@ final class User extends DatabaseObject implements IRouteController, IUserConten return []; } + + /** + * Returns a human readable list of fields that have positive matches against the + * blacklist. If you require the raw field names, please use `getBlacklistMatches()` + * instead. + * + * @return string[] + * @since 5.2 + */ + public function getBlacklistMatchesTitle() { + return array_map(function($field) { + return WCF::getLanguage()->get('wcf.user.' . $field); + }, $this->getBlacklistMatches()); + } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 9590923f6d..bb7733a34a 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -4625,7 +4625,7 @@ sich{/if} nicht bei uns registriert {if LANGUAGE_USE_INFORMAL_VARIANT}hast{else} - + getBlacklistMatchesTitle() item=matchLabel}{$matchLabel}{/implode}).]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 3b83047068..231c2d4597 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -4622,7 +4622,7 @@ not register with us.]]> - + getBlacklistMatchesTitle() item=matchLabel}{$matchLabel}{/implode}).]]> -- 2.20.1