From fe659b4aaa3f8d46359e5c448c25ba4b8a82b907 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 22 Sep 2011 07:53:04 +1200 Subject: [PATCH] Set 'active' and 'default_privileges' fallback values. --- inc/drivers_ldap.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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'