ftos.identity.users.getInactive
IMPORTANT!
Starting with v24.3.0, this is renamed from inactiveUsers to ftos.identity.users.getInactive.
Starting with v24.3.0, this is renamed from inactiveUsers to ftos.identity.users.getInactive.
Returns a list of users that haven't been active for a specified number of days.
This is a business logic method for business service components.
Syntax
Copy
function ftos.identity.users.getInactive(daysOfInactivity : number): IFtosSystemUser[];
| Parameter | Type | Description |
|---|---|---|
daysOfInactivity
|
number | Duration in days since the users haven't been active. |
Return Value
Returns an array of IFtosSystemUser objects that store the details of each inactive user.
Type Aliases
JSON object containing details about a system user.
Copy
{
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 not been active for 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 = ftos.identity.users.getInactive(7);
let listOfUsers = new Array;
users.forEach(addToList);
function addToList(value){
listOfUsers.push(value.userName)
};
log(listOfUsers);