fix old AD class in account-migration

This commit is contained in:
Ralf Becker 2020-01-24 14:18:35 +01:00
parent e9c4d3f07e
commit 8ab7caf855

View File

@ -364,12 +364,12 @@ class setup_cmd_ldap extends setup_cmd
// need to write accountExpires for never expiring account, as samba-tool classicupgrade sets it to 2038-01-19
if (!isset($entry['shadowexpire']) || !$entry['shadowexpire'])
{
$entry['shadowexpire'] = accounts_ads::EXPIRES_NEVER;
$entry['shadowexpire'] = Api\Accounts\Ads::EXPIRES_NEVER;
}
else
{
if (is_null($utc_diff)) $utc_diff = date('Z');
$entry['shadowexpire'] = accounts_ads::convertUnixTimeToWindowsTime(
$entry['shadowexpire'] = Api\Accounts\Ads::convertUnixTimeToWindowsTime(
$entry['shadowexpire']*24*3600+$utc_diff); // ldap time to unixTime
}
}