Merge pull request #48014 from nextcloud/fix/tags/boolean-user-has-tags

This commit is contained in:
Kate 2024-09-15 17:48:27 +02:00 committed by GitHub
commit 77de180faa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -248,8 +248,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;
}
/**