usersAboutToExpirePasswords
IMPORTANT!
Starting with v24.3, this is deprecated.
Starting with v24.3, this is deprecated.
IMPORTANT!
This function is deprecated starting with v24.
This function is deprecated starting with v24.
Returns the list of users whose passwords will expire within a specific number of days.
Syntax
Copy
function usersAboutToExpirePasswords(passwordExpireDaysMax : number): IFtosSystemUserExtended[];
| Parameter | Type | Description |
|---|---|---|
passwordExpireDaysMax
|
number | Maximum number of days until password expiration. |
Return Value
Returns an array of IFtosSystemUserExtended objects that store the details of each user with an expiring password.
Type Aliases
JSON object containing details about a system user.
Copy
{
daysUntilPasswordExpire : number;
authProvider : string;
businessUnitId : string;
displayName : string;
email : string;
externalId? : number;
isAdministrator : boolean;
isAuthorized : boolean;
isGuest : boolean;
organizationId : string;
phoneNumber : string;
picture : string;
portal : IFtosPortal;
securityRoleIds : string[];
securityRoleNames : string[];
systemUserId? : string;
systemUserTypeId? : string;
userName : string;
}
Examples
In this example:
-
We store the user accounts that have passwords that will expire in 7 days in a variable called users.
-
We iterate over the users variable and add each userName to an array called listOfUsers.
-
We ftos.logging.log the listOfUsers in the trace_roll.log file.
Copy
let users = usersAboutToExpirePasswords(7);
let listOfUsers = new Array;
users.forEach(addToList);
function addToList(value){
listOfUsers.push(value.userName)
};
log(listOfUsers);