diff --git a/tests/scripts/synchronize_user_base_from_ldap.php b/tests/scripts/synchronize_user_base_from_ldap.php index 516700ed1ff..adcfd7afabe 100644 --- a/tests/scripts/synchronize_user_base_from_ldap.php +++ b/tests/scripts/synchronize_user_base_from_ldap.php @@ -51,7 +51,8 @@ //$extraLdapAttributes[0][] = 'description'; //$extraLdapAttributes[0][] = 'userAccountControl'; - +// Extra field to be emptied when user is anonimized to really make it anonyme, for example the sso id of the user +// extraFieldToEmpty = "cas_user"; use Chamilo\CoreBundle\Entity\ExtraFieldValues; @@ -477,6 +478,9 @@ or die("could not anonymize user $userId\n"); } catch (Exception $exception) { die($exception->getMessage()."\n"); + } + if (isset($extraFieldToEmpty)) { + UserManager::update_extra_field_value($userId,$extraFieldToEmpty,''); } } if ($debug) {