diff options
author | Juan Pablo Villafáñez <jvillafanez@solidgear.es> | 2016-10-04 18:12:48 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-12-05 11:29:47 +0100 |
commit | efa10778720a853843cf66355d958f2d84ca6c3e (patch) | |
tree | c22ae4f27017a1fe2d0e0cf54de746356b2b8b71 /apps/user_ldap/lib/Access.php | |
parent | 6496b95564828726eaed87ab15141846d3da0287 (diff) | |
download | nextcloud-server-efa10778720a853843cf66355d958f2d84ca6c3e.tar.gz nextcloud-server-efa10778720a853843cf66355d958f2d84ca6c3e.zip |
Extract lowercase conversion out of the loop
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/Access.php')
-rw-r--r-- | apps/user_ldap/lib/Access.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 7f5bc028b6b..1a9c04aef77 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -280,10 +280,11 @@ class Access extends LDAPUtility implements IUserTools { public function extractAttributeValuesFromResult($result, $attribute) { $values = []; if(isset($result[$attribute]) && $result[$attribute]['count'] > 0) { + $lowercaseAttribute = strtolower($attribute); for($i=0;$i<$result[$attribute]['count'];$i++) { if($this->resemblesDN($attribute)) { $values[] = $this->sanitizeDN($result[$attribute][$i]); - } elseif(strtolower($attribute) === 'objectguid' || strtolower($attribute) === 'guid') { + } elseif($lowercaseAttribute === 'objectguid' || $lowercaseAttribute === 'guid') { $values[] = $this->convertObjectGUID2Str($result[$attribute][$i]); } else { $values[] = $result[$attribute][$i]; |