From a8a8bfb0afdd105980181a5fa11701028ff5adfe Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 2 Jul 2016 18:23:47 -0400 Subject: Added more unit tests for LDAP user class --- app/Core/Ldap/User.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Core/Ldap') diff --git a/app/Core/Ldap/User.php b/app/Core/Ldap/User.php index 91b48530..4bc1f5f9 100644 --- a/app/Core/Ldap/User.php +++ b/app/Core/Ldap/User.php @@ -116,7 +116,7 @@ class User */ protected function getRole(array $groupIds) { - if ($this->hasGroupsNotConfigured()) { + if (! $this->hasGroupsConfigured()) { return null; } @@ -278,14 +278,14 @@ class User } /** - * Return true if LDAP Group mapping is not configured + * Return true if LDAP Group mapping are configured * * @access public * @return boolean */ - public function hasGroupsNotConfigured() + public function hasGroupsConfigured() { - return !$this->getGroupAdminDn() && !$this->getGroupManagerDn(); + return $this->getGroupAdminDn() || $this->getGroupManagerDn(); } /** -- cgit v1.2.3