aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-15 15:27:37 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-09-15 15:49:44 +0000
commit9b0c27c367ec3518bd543438eed8036626eb4ff6 (patch)
tree5a7ec5226256cc420f339897eebf58ce3048c5de /lib/private
parent124b565c33e81f7a0c01a2ec62542e4eda21ef35 (diff)
downloadnextcloud-server-9b0c27c367ec3518bd543438eed8036626eb4ff6.tar.gz
nextcloud-server-9b0c27c367ec3518bd543438eed8036626eb4ff6.zip
fix(Tags): Return boolean for userHasTags()backport/48014/stable28
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Tags.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index 766166beadd..8f594b8d652 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -272,8 +272,7 @@ class Tags implements ITags {
* @param string $user The user whose tags are to be checked.
*/
public function userHasTag(string $name, string $user): bool {
- $key = $this->array_searchi($name, $this->getTagsForUser($user));
- return ($key !== false) ? $this->tags[$key]->getId() : false;
+ return $this->array_searchi($name, $this->getTagsForUser($user)) !== false;
}
/**