diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index b78bcf19..b241d4d7 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -261,7 +261,11 @@ function sync_user_from_LDAP( Principal &$principal, $mapping, $ldap_values ) { dbg_error_log( "LDAP", "Going to sync the user from LDAP" ); - $fields_to_set = array( 'username' => $principal->username() ); + $fields_to_set = array( + 'username' => $principal->username(), + 'active' => true, + 'default_privileges' => decbin(privilege_to_bits($c->default_privileges)) + ); $updateable_fields = Principal::updateableFields(); $updateable_fields[] = 'active'; // Backward compatibility: now 'user_exists' $updateable_fields[] = 'updated'; // Backward compatibility: now 'modified'