Use the ICIClientSettings interface SetExpirationDate method to set the expiration date for a particular user account. Use GetExpirationDate to determine whether the expiration date is set. When passing values to COM methods, VARIANTS are preferred to STRING values. Refer to User Account General Settings for an illustration of how this and other Client Settings interface methods and properties can be accessed in the Administrator interface.
Signature:
HRESULT SetExpirationdate (
[in] VARIANT *dDate,
[in] VARIANT_BOOL *bEnable);
This example, written in PHP 5, uses a VARIANT rather than a STRING to set the expiration date:
$expiredate = "05/15/2005";
$enableexpiration = 1;
$vtdate = new VARIANT($expiredate, VT_DATE);
$UserSettings->SetExpirationDate($expiredate, $enableexpiration);
VBS example:
Set client_settings = Site.GetUserSettings("testuser")
client_settings.SetExpirationDate CDate(FormatDateTime("15/05/2005")),True