|
|
|
|
@ -51,7 +51,8 @@ $anonymizeUserAccountsDisbaledFor3Years = false; |
|
|
|
|
//$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; |
|
|
|
|
@ -478,6 +479,9 @@ if ($anonymizeUserAccountsDisbaledFor3Years) { |
|
|
|
|
} catch (Exception $exception) { |
|
|
|
|
die($exception->getMessage()."\n"); |
|
|
|
|
} |
|
|
|
|
if (isset($extraFieldToEmpty)) { |
|
|
|
|
UserManager::update_extra_field_value($userId,$extraFieldToEmpty,''); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ($debug) { |
|
|
|
|
echo "Anonymized user $userId\n"; |
|
|
|
|
|