diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-08-30 16:46:00 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-10-20 13:14:39 +0200 |
commit | 1a6a6c985a014a0759135c9cc694cbf2d430b650 (patch) | |
tree | a8273cd9de4d651177799d1be7fd0cd29147cdb6 /apps | |
parent | 746a5fb7e07c806af7f0e9b0ebb3f72d823452a8 (diff) | |
download | nextcloud-server-1a6a6c985a014a0759135c9cc694cbf2d430b650.tar.gz nextcloud-server-1a6a6c985a014a0759135c9cc694cbf2d430b650.zip |
Bring back small fixes by Carl
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/Group_LDAP.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index d5d715d1b51..d5a1cab30fe 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -45,16 +45,15 @@ namespace OCA\User_LDAP; use Exception; -use OC; use OCP\Cache\CappedMemoryCache; -use OC\ServerNotAvailableException; -use OCP\Group\Backend\IGetDisplayNameBackend; -use OCP\Group\Backend\IDeleteGroupBackend; use OCP\GroupInterface; +use OCP\Group\Backend\IDeleteGroupBackend; +use OCP\Group\Backend\IGetDisplayNameBackend; +use OC\ServerNotAvailableException; use Psr\Log\LoggerInterface; class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, IGetDisplayNameBackend, IDeleteGroupBackend { - protected $enabled = false; + protected bool $enabled = false; /** @var CappedMemoryCache<string[]> $cachedGroupMembers array of users with gid as key */ protected CappedMemoryCache $cachedGroupMembers; @@ -82,7 +81,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I $this->cachedGroupsByMember = new CappedMemoryCache(); $this->cachedNestedGroups = new CappedMemoryCache(); $this->groupPluginManager = $groupPluginManager; - $this->logger = OC::$server->get(LoggerInterface::class); + $this->logger = \OCP\Server::get(LoggerInterface::class); $this->ldapGroupMemberAssocAttr = strtolower((string)$gAssoc); } @@ -91,11 +90,10 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I * * @param string $uid uid of the user * @param string $gid gid of the group - * @return bool * @throws Exception * @throws ServerNotAvailableException */ - public function inGroup($uid, $gid) { + public function inGroup($uid, $gid): bool { if (!$this->enabled) { return false; } |