From: Alexander Ebert Date: Thu, 25 Jul 2019 10:21:47 +0000 (+0200) Subject: Include the name of the blacklist matches for disabled users X-Git-Tag: 5.2.0_Alpha_3~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c225e3e3edff1ab15126f50cb4fac24cc58ed108;p=GitHub%2FWoltLab%2FWCF.git Include the name of the blacklist matches for disabled users See #2948 --- 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}).]]>