Kyle Waters wrote:
Dave Smith wrote:
Kyle Waters wrote:
phpldapadmin doesn't behave as I wish. It seems to be selecting
from above 1000. I wish to be a little pickier than that.
Is lifting the code and changing the 1000 not adequate for your project?
--Dave
I guess I should explain(I hate all this list default to the person
and not the list). Does the phpldap stuff grab the first availiable
number over 1000 or lowest number not used. Because I want the lowest
one and that doesn't seem to be what it's doing.
I don't know anymore. I haven't had my hands in the code for some years.
I know that it can operate in two ways: 1 with the uid pool object and 2
by doing a search and grabbing the next available number (not sure if
it's the largest or smallest). It should be very easy to whip up some
code to grab all the uid numbers in use, iterate over all of them, and
find the next available number below the rest. The code would look
something like this:
ldap_connect
ldap_bind
ldap_search
make a hash of the uid numbers found in the search
for i=1000; i<some_value; i++
if i is NOT in the hash, use it.
if a uid was not found, error out.
--Dave
_______________________________________________
UPHPU mailing list
UPHPU@uphpu.org
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net