From 4ce044ee0a8a656631eefbdb0c5e074673981435 Mon Sep 17 00:00:00 2001 From: Nicolas Ducoulombier Date: Tue, 17 Dec 2019 13:23:06 +0100 Subject: [PATCH] Fix access to LP in category when only a group is subscribe and no user directly -refs BT#16496 --- main/lp/learnpath.class.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/main/lp/learnpath.class.php b/main/lp/learnpath.class.php index e4246ae249..d7082ef45d 100755 --- a/main/lp/learnpath.class.php +++ b/main/lp/learnpath.class.php @@ -4611,12 +4611,10 @@ class learnpath } $users = $category->getUsers(); - + $response = false; if (empty($users) || !$users->count()) { - return true; - } - - if ($category->hasUserAdded($user)) { + $response = true; + } elseif ($category->hasUserAdded($user)) { return true; } @@ -4657,7 +4655,7 @@ class learnpath } } - return false; + return $response; } /**