mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
fix(LDAP): do not use count() inside a loop
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
d70f67e93d
commit
b10d1b5c02
1 changed files with 2 additions and 1 deletions
|
|
@ -129,7 +129,8 @@ class User {
|
|||
$attr = strtolower($this->connection->ldapEmailAttribute);
|
||||
if (isset($ldapEntry[$attr])) {
|
||||
$mailValue = 0;
|
||||
for ($x = 0; $x < count($ldapEntry[$attr]); $x++) {
|
||||
$emailValues = count($ldapEntry[$attr]);
|
||||
for ($x = 0; $x < $emailValues; $x++) {
|
||||
if (filter_var($ldapEntry[$attr][$x], FILTER_VALIDATE_EMAIL)) {
|
||||
$mailValue = $x;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue