Account expiry dates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2009 03:57 AM
Hello
We currently import our users from active directory to SNC via the LDAP plugin. I want to bring over the account expiry dates too but as this is stored in Integer8 format it will need some transform scripting to get it to show a human-readable date format.
I'm afraid I have no idea how to convert Integer* to the current date format. Can anyone offer help or guidance?
Thanks
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2020 01:13 AM
Hi bteacher,
I've tried your solution here, but I get this Warning;
org.mozilla.javascript.EcmaError: Cannot read property "u_account_expires" from null
Caused by error in sys_transform_script.929e9bab1bd4e410f94c7739cd4bcbe0.script at line 16
13: gs.log('Setting the Account Expires date for ' + target.name + ' to ' + gDate);
14: }
15: // Clear the SN Account Expires date if the accountExpires date is no longer set in AD
==> 16: else if (!target.u_account_expires.nil()) {
17: target.u_account_expires = '';
18: gs.log('Updating the SN Account Expires date for ' + target.name + ' to Never');
19: }
Any idea of why? Or does anyone else know why I get this Warning when I use this solution? I still do get the values (large integer witch starts with 13), but this doesn't populate to field Account Expires.
Best regards,
Adrian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2016 11:30 AM
Hello All,
Has anyone figured out regarding the issue where the expiry date in the user table is displaying 1 day ahead of the actual account expiration in AD? I have tried all the recommended fix in this thread but with no avail.
Thanks in advance.
Edwin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2016 07:11 AM
var gDate = source.u_accountexpires - 864000000000;
var dtUtil = new DateTimeUtils();
target.u_account_expires = dtUtil.int8ToGlideDateTime(gDate);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2020 02:10 AM
Copy from reply further up in this post:
Hi bteacher,
I've tried your solution here, but I get this Warning;
org.mozilla.javascript.EcmaError: Cannot read property "u_account_expires" from null
Caused by error in sys_transform_script.929e9bab1bd4e410f94c7739cd4bcbe0.script at line 16
13: gs.log('Setting the Account Expires date for ' + target.name + ' to ' + gDate);
14: }
15: // Clear the SN Account Expires date if the accountExpires date is no longer set in AD
==> 16: else if (!target.u_account_expires.nil()) {
17: target.u_account_expires = '';
18: gs.log('Updating the SN Account Expires date for ' + target.name + ' to Never');
19: }
Any idea of why? Or does anyone else know why I get this Warning when I use this solution? I still do get the values (large integer witch starts with 13), but this doesn't populate to field Account Expires.
Best regards,
Adrian