mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Remove another warning possibility.
This commit is contained in:
parent
af5fa5d7c4
commit
9b069af2a9
@ -219,10 +219,12 @@ function sync_user_from_LDAP( &$usr, $mapping, $ldap_values ) {
|
|||||||
dbg_error_log( "LDAP", "Going to sync the user from LDAP" );
|
dbg_error_log( "LDAP", "Going to sync the user from LDAP" );
|
||||||
$validUserFields = get_fields('usr');
|
$validUserFields = get_fields('usr');
|
||||||
|
|
||||||
foreach ( $c->authenticate_hook['config']['default_value'] as $field => $value ) {
|
if ( isset($c->authenticate_hook['config']['default_value']) && is_array($c->authenticate_hook['config']['default_value']) ) {
|
||||||
if ( isset($validUserFields[$field]) ) {
|
foreach ( $c->authenticate_hook['config']['default_value'] as $field => $value ) {
|
||||||
$usr->{$field} = $value;
|
if ( isset($validUserFields[$field]) ) {
|
||||||
dbg_error_log( "LDAP", "Setting usr->%s to %s from configured defaults", $field, $value );
|
$usr->{$field} = $value;
|
||||||
|
dbg_error_log( "LDAP", "Setting usr->%s to %s from configured defaults", $field, $value );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user