mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
- LSaddon::Posix : Optimisation des recherches pour le calcul des
uidNumber et des gidNumber
This commit is contained in:
parent
e0ccd6de6d
commit
fc9d9d2377
1 changed files with 18 additions and 2 deletions
|
@ -90,7 +90,15 @@ LSerror :: defineError('POSIX_01',
|
||||||
*/
|
*/
|
||||||
function generate_uidNumber($ldapObject) {
|
function generate_uidNumber($ldapObject) {
|
||||||
|
|
||||||
$objects = LSldap :: search (LS_POSIX_UIDNUMBER_ATTR.'=*');
|
$objects = LSldap :: search (
|
||||||
|
LS_POSIX_UIDNUMBER_ATTR.'=*',
|
||||||
|
NULL,
|
||||||
|
array(
|
||||||
|
'attributes' => array(
|
||||||
|
LS_POSIX_UIDNUMBER_ATTR
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
$uidNumber = LS_POSIX_UIDNUMBER_MIN_VAL;
|
$uidNumber = LS_POSIX_UIDNUMBER_MIN_VAL;
|
||||||
|
|
||||||
if (!is_array($objects))
|
if (!is_array($objects))
|
||||||
|
@ -117,7 +125,15 @@ LSerror :: defineError('POSIX_01',
|
||||||
*/
|
*/
|
||||||
function generate_gidNumber($ldapObject) {
|
function generate_gidNumber($ldapObject) {
|
||||||
|
|
||||||
$objects = LSldap :: search (LS_POSIX_GIDNUMBER_ATTR.'=*');
|
$objects = LSldap :: search (
|
||||||
|
LS_POSIX_GIDNUMBER_ATTR.'=*',
|
||||||
|
NULL,
|
||||||
|
array(
|
||||||
|
'attributes' => array(
|
||||||
|
LS_POSIX_GIDNUMBER_ATTR
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
$gidNumber = LS_POSIX_GIDNUMBER_MIN_VAL;
|
$gidNumber = LS_POSIX_GIDNUMBER_MIN_VAL;
|
||||||
|
|
||||||
if (!is_array($objects))
|
if (!is_array($objects))
|
||||||
|
|
Loading…
Reference in a new issue