From cce60c9cffc02f05d03dae25ea25d84d3a35298f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Fri, 28 Jun 2019 23:02:05 +0200 Subject: [PATCH] Disable send new password clipboard action for 3rdparty connected users See #2951 --- .../clipboard/action/UserClipboardAction.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php b/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php index eab5ad196f..1e92ad7f78 100644 --- a/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php +++ b/wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php @@ -2,6 +2,7 @@ namespace wcf\system\clipboard\action; use wcf\data\clipboard\action\ClipboardAction; use wcf\data\user\group\UserGroup; +use wcf\data\user\User; use wcf\data\user\UserAction; use wcf\system\database\util\PreparedStatementConditionBuilder; use wcf\system\request\LinkHandler; @@ -171,7 +172,13 @@ class UserClipboardAction extends AbstractClipboardAction { return []; } - return $this->__validateAccessibleGroups(array_keys($this->objects)); + $userIDs = []; + /** @var User $user */ + foreach ($this->objects as $user) { + if (empty($user->authData)) $userIDs[] = $user->userID; + } + + return $this->__validateAccessibleGroups($userIDs); } /** -- 2.20.1