mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-03 14:09:23 +00:00
Have some sane defaults for LDAP group mappings
This commit is contained in:
parent
13083b07e8
commit
2a30a9646c
@ -506,14 +506,18 @@ function sync_LDAP_groups(){
|
||||
unset($mapping['username']);
|
||||
}
|
||||
|
||||
// Set sane defaults.
|
||||
if (! isset($mapping['name']))
|
||||
$mapping['name'] = 'cn';
|
||||
if (! isset($mapping['members']))
|
||||
$mapping['members'] = 'member';
|
||||
|
||||
$attributes = array_values_mapping($mapping);
|
||||
$ldap_groups_tmp = $ldapDriver->getAllGroups($attributes);
|
||||
|
||||
if ( sizeof($ldap_groups_tmp) == 0 ) return;
|
||||
|
||||
$member_field = isset($mapping['members'])
|
||||
? $mapping['members']
|
||||
: 'member';
|
||||
$member_field = $mapping['members'];
|
||||
|
||||
$dnfix = isset($c->authenticate_hook['config']['group_member_dnfix'])
|
||||
&& $c->authenticate_hook['config']['group_member_dnfix'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user