-
Notifications
You must be signed in to change notification settings - Fork 10
stored max id values in sitevars table #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all three methods, could you add an additional bit of logic that checks the LDAP DB to make sure that $new_uid
is not currently being used by an ldap object? You only need to check the OU that corresponds ot the method. If it is used, increment 1 to the value and check again, so this should probably be a while loop.
It looks like there is already a method header for UIDNumInUse, but it just returns false. You can use that header |
return $id; | ||
$UnitySQL->updateSiteVar('MAX_GID', $new_gid); | ||
|
||
return $new_gid; | ||
} | ||
|
||
private function UIDNumInUse($id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if you made 2 additional methods for GIDNumInUse
and PIGIDNumInUse
to keep it consistent.
Co-authored-by: Hakan Saplakoglu <hakansaplakog@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Thanks
sitevars
(Structure:id
,name
,value
)MAX_UID
,MAX_GID
,MAX_PIGID
.