Skip to content

Commit 01c80f8

Browse files
committed
fix undefined variable
1 parent d1916a2 commit 01c80f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/lib/UnityLDAP.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ public function getNextUIDGIDNumber($uid)
9191
$IDNumsInUse = array_merge($this->getAllUIDNumbersInUse(), $this->getAllGIDNumbersInUse());
9292
$start = $this->offset_UIDGID;
9393
$customIDMappings = $this->getCustomIDMappings();
94-
if (array_key_exists($uid, $customIDMappings)) {
94+
$customMappedID = $customIDMappings[$uid] ?? null;
95+
if (!is_null($customMappedID) && !in_array($customMappedID, $IDNumsInUse)) {
9596
return $customMappedID;
9697
}
9798
if (!is_null($customMappedID) && in_array($customMappedID, $IDNumsInUse)) {

0 commit comments

Comments
 (0)