Class NSUser
SuperOffice User, with login credentials and an associated person.
Syntax
Constructors
NSUser()
Initializes a new instance of the NSUser class.
Declaration
NSUser
Methods
GetAssociateId()
SuperOffice User, with login credentials and an associated person.
Declaration
Integer GetAssociateId()
Returns
Type | Description |
---|---|
Integer | Primary key. |
Examples
NSUser thing;
Integer associateId = thing.GetAssociateId();
GetCredentials()
SuperOffice User, with login credentials and an associated person.
Declaration
NSCredential[] GetCredentials()
Returns
Type | Description |
---|---|
NSCredential[] | List of credentials registered for this user. i.e. valid authentication methods. |
Examples
NSUser thing;
NSCredential[] credentials = thing.GetCredentials();
GetCustomFields()
Gets the user-defined + extra fields on a User as a map.
Declaration
Map GetCustomFields()
Returns
Type | Description |
---|---|
Map |
Examples
NSUser thing;
Map fields = thing.GetCustomFields();
String oldValue = fields.get("SuperOffice:1");
fields.insert("SuperOffice:1", "NewValue");
for (fields.first(); !fields.eof(); fields.next())
printLine(fields.getKey() + ": " + fields.getVal());
GetDeleted()
SuperOffice User, with login credentials and an associated person.
Declaration
Bool GetDeleted()
Returns
Type | Description |
---|---|
Bool | If true, the user is retired and should have no rights, not appear in lists, etc. |
Examples
NSUser thing;
Bool deleted = thing.GetDeleted();
GetDisplayName()
SuperOffice User, with login credentials and an associated person.
Declaration
String GetDisplayName()
Returns
Type | Description |
---|---|
String | The unique display name for this user. Used in Service as an alias, similar to Name/Initials. |
GetEjUserId()
SuperOffice User, with login credentials and an associated person.
Declaration
Integer GetEjUserId()
Returns
Type | Description |
---|---|
Integer | ID of the ej user record corresponding to this associate; 0 for associates that are not ej users. |
Examples
NSUser thing;
Integer ejUserId = thing.GetEjUserId();
GetExtraFields()
Gets the extra fields on User as a map.
Declaration
Map GetExtraFields()
Returns
Type | Description |
---|---|
Map |
Examples
NSUser thing;
Map fields = thing.GetExtraFields();
String oldValue = fields.get("x_foobar");
fields.insert("x_foobar", "NewValue");
for (fields.first(); !fields.eof(); fields.next())
printLine(fields.getKey() + ": " + fields.getVal());
GetIsOnTravel()
SuperOffice User, with login credentials and an associated person.
Declaration
Bool GetIsOnTravel()
Returns
Type | Description |
---|---|
Bool | True if the user is on travel. |
Examples
NSUser thing;
Bool isOnTravel = thing.GetIsOnTravel();
GetIsPersonRetired()
SuperOffice User, with login credentials and an associated person.
Declaration
Bool GetIsPersonRetired()
Returns
Type | Description |
---|---|
Bool | True if the user is retired and should have no rights, not appear in lists, etc. |
Examples
NSUser thing;
Bool isPersonRetired = thing.GetIsPersonRetired();
GetLastlogin()
SuperOffice User, with login credentials and an associated person.
Declaration
DateTime GetLastlogin()
Returns
Type | Description |
---|---|
DateTime | Last login date. |
Examples
NSUser thing;
DateTime lastlogin = thing.GetLastlogin();
GetLastlogout()
SuperOffice User, with login credentials and an associated person.
Declaration
DateTime GetLastlogout()
Returns
Type | Description |
---|---|
DateTime | Last logout date. |
Examples
NSUser thing;
DateTime lastlogout = thing.GetLastlogout();
GetLicenseOwners()
SuperOffice User, with login credentials and an associated person.
Declaration
NSLicenseOwner[] GetLicenseOwners()
Returns
Type | Description |
---|---|
NSLicenseOwner[] | The restricted and unrestricted module licenses grouped by license owner. |
Remarks
These module licenses are either assigned or unassigned to this user
Examples
NSUser thing;
NSLicenseOwner[] licenseOwners = thing.GetLicenseOwners();
GetName()
SuperOffice User, with login credentials and an associated person.
Declaration
String GetName()
Returns
Type | Description |
---|---|
String | Initials, UserId* also used as login name for on-site installations. Identifies user in archives. |
Examples
NSUser thing;
String name = thing.GetName();
GetNickName()
SuperOffice User, with login credentials and an associated person.
Declaration
String GetNickName()
Returns
Type | Description |
---|---|
String | The unique nick name for this user. Used in Service as an alias, similar to Name/Initials. |
Examples
NSUser thing;
String nickName = thing.GetNickName();
GetOtherGroups()
SuperOffice User, with login credentials and an associated person.
Declaration
NSUserGroup[] GetOtherGroups()
Returns
Type | Description |
---|---|
NSUserGroup[] | The other groups this user is a member of, apart from the main user group. |
Examples
NSUser thing;
NSUserGroup[] otherGroups = thing.GetOtherGroups();
GetPerson()
SuperOffice User, with login credentials and an associated person.
Declaration
NSPerson GetPerson()
Returns
Type | Description |
---|---|
NSPerson | The person associated with this user. Detailed information about the user. |
Examples
NSUser thing;
NSPerson person = thing.GetPerson();
GetRank()
SuperOffice User, with login credentials and an associated person.
Declaration
Integer GetRank()
Returns
Type | Description |
---|---|
Integer | Rank order. |
Examples
NSUser thing;
Integer rank = thing.GetRank();
GetRequestSignature()
SuperOffice User, with login credentials and an associated person.
Declaration
String GetRequestSignature()
Returns
Type | Description |
---|---|
String | ej users request signature. |
Examples
NSUser thing;
String requestSignature = thing.GetRequestSignature();
GetRole()
SuperOffice User, with login credentials and an associated person.
Declaration
NSRole GetRole()
Returns
Type | Description |
---|---|
NSRole | Users role for role-based security. Determines permissions and access rights for the user. |
Examples
NSUser thing;
NSRole role = thing.GetRole();
GetTicketCategories()
SuperOffice User, with login credentials and an associated person.
Declaration
NSMDOListItem[] GetTicketCategories()
Returns
Type | Description |
---|---|
NSMDOListItem[] | Request Ticket Categories assigned to the user. |
Examples
NSUser thing;
NSMDOListItem[] ticketCategories = thing.GetTicketCategories();
GetTooltip()
SuperOffice User, with login credentials and an associated person.
Declaration
String GetTooltip()
Returns
Type | Description |
---|---|
String | Tooltip or other description. |
Examples
NSUser thing;
String tooltip = thing.GetTooltip();
GetType()
SuperOffice User, with login credentials and an associated person.
Declaration
Integer GetType()
Returns
Type | Description |
---|---|
Integer | NSUser type 1=InternalAssociate, 2=ResourceAssociate, 3=ExternalAssociate, 4=AnonymousAssociate, 5=SystemAssociate. |
Examples
NSUser thing;
Integer type = thing.GetType();
GetUserGroup()
SuperOffice User, with login credentials and an associated person.
Declaration
NSUserGroup GetUserGroup()
Returns
Type | Description |
---|---|
NSUserGroup | The main user group that this user belongs to. |
Examples
NSUser thing;
NSUserGroup userGroup = thing.GetUserGroup();
GetUserName()
SuperOffice User, with login credentials and an associated person.
Declaration
String GetUserName()
Returns
Type | Description |
---|---|
String | User name, a.k.a. Login name. This might be an email address. |
Examples
NSUser thing;
String userName = thing.GetUserName();
GetWaitingForApproval()
SuperOffice User, with login credentials and an associated person.
Declaration
Bool GetWaitingForApproval()
Returns
Type | Description |
---|---|
Bool | The user is waiting for an administrator to approve/grant her/him access. |
Examples
NSUser thing;
Bool waitingForApproval = thing.GetWaitingForApproval();
SetAssociateId(Integer)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetAssociateId(Integer associateId)
Parameters
Type | Name | Description |
---|---|---|
Integer | associateId | Primary key. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Integer associateId;
thing.SetAssociateId(associateId);
SetCredentials(NSCredential[])
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetCredentials(NSCredential[] credentials)
Parameters
Type | Name | Description |
---|---|---|
NSCredential[] | credentials | List of credentials registered for this user. i.e. valid authentication methods. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
NSCredential[] credentials;
thing.SetCredentials(credentials);
SetCustomFields(Map)
Sets the user-defined and extra fields on a User with a map.
Declaration
Void SetCustomFields(Map udefs)
Parameters
Type | Name | Description |
---|---|---|
Map | udefs |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Map udefs;
udefs["SuperOffice:1"] = "[I:123]";
udefs["SuperOffice:1"] = "123"; // this will also work, but beware of decimal point variations in different languages
udefs["custom.progid"] = "foobar";
udefs["x_foo"] = "foobar";
udefs["x_bar"] = "456"; // List item id
thing.SetCustomFields(udefs);
SetDeleted(Bool)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetDeleted(Bool deleted)
Parameters
Type | Name | Description |
---|---|---|
Bool | deleted | If true, the user is retired and should have no rights, not appear in lists, etc. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Bool deleted;
thing.SetDeleted(deleted);
SetDisplayName(String)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetDisplayName(String displayName)
Parameters
Type | Name | Description |
---|---|---|
String | displayName | The unique display name for this user. Used in Service as an alias, similar to Name/Initials. |
Returns
Type | Description |
---|---|
Void |
SetEjUserId(Integer)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetEjUserId(Integer ejUserId)
Parameters
Type | Name | Description |
---|---|---|
Integer | ejUserId | ID of the ej user record corresponding to this associate; 0 for associates that are not ej users. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Integer ejUserId;
thing.SetEjUserId(ejUserId);
SetExtraFields(Map)
Sets the extra field values on User with a map.
Declaration
Void SetExtraFields(Map extras)
Parameters
Type | Name | Description |
---|---|---|
Map | extras |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Map extras;
extras["SuperOffice:1"] = "[I:123]";
extras["SuperOffice:1"] = "123"; // this will also work, but beware of decimal point variations in different languages
extras["custom.progid"] = "foobar";
thing.SetExtraFields(extras);
SetIsOnTravel(Bool)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetIsOnTravel(Bool isOnTravel)
Parameters
Type | Name | Description |
---|---|---|
Bool | isOnTravel | True if the user is on travel. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Bool isOnTravel;
thing.SetIsOnTravel(isOnTravel);
SetIsPersonRetired(Bool)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetIsPersonRetired(Bool isPersonRetired)
Parameters
Type | Name | Description |
---|---|---|
Bool | isPersonRetired | True if the user is retired and should have no rights, not appear in lists, etc. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Bool isPersonRetired;
thing.SetIsPersonRetired(isPersonRetired);
SetLastlogin(DateTime)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetLastlogin(DateTime lastlogin)
Parameters
Type | Name | Description |
---|---|---|
DateTime | lastlogin | Last login date. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
DateTime lastlogin;
thing.SetLastlogin(lastlogin);
SetLastlogout(DateTime)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetLastlogout(DateTime lastlogout)
Parameters
Type | Name | Description |
---|---|---|
DateTime | lastlogout | Last logout date. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
DateTime lastlogout;
thing.SetLastlogout(lastlogout);
SetLicenseOwners(NSLicenseOwner[])
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetLicenseOwners(NSLicenseOwner[] licenseOwners)
Parameters
Type | Name | Description |
---|---|---|
NSLicenseOwner[] | licenseOwners | The restricted and unrestricted module licenses grouped by license owner. |
Returns
Type | Description |
---|---|
Void |
Remarks
These module licenses are either assigned or unassigned to this user
Examples
NSUser thing;
NSLicenseOwner[] licenseOwners;
thing.SetLicenseOwners(licenseOwners);
SetName(String)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetName(String name)
Parameters
Type | Name | Description |
---|---|---|
String | name | Initials, UserId* also used as login name for on-site installations. Identifies user in archives. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
String name;
thing.SetName(name);
SetNickName(String)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetNickName(String nickName)
Parameters
Type | Name | Description |
---|---|---|
String | nickName | The unique nick name for this user. Used in Service as an alias, similar to Name/Initials. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
String nickName;
thing.SetNickName(nickName);
SetOtherGroups(NSUserGroup[])
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetOtherGroups(NSUserGroup[] otherGroups)
Parameters
Type | Name | Description |
---|---|---|
NSUserGroup[] | otherGroups | The other groups this user is a member of, apart from the main user group. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
NSUserGroup[] otherGroups;
thing.SetOtherGroups(otherGroups);
SetPerson(NSPerson)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetPerson(NSPerson person)
Parameters
Type | Name | Description |
---|---|---|
NSPerson | person | The person associated with this user. Detailed information about the user. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
NSPerson person;
thing.SetPerson(person);
SetRank(Integer)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetRank(Integer rank)
Parameters
Type | Name | Description |
---|---|---|
Integer | rank | Rank order. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Integer rank;
thing.SetRank(rank);
SetRequestSignature(String)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetRequestSignature(String requestSignature)
Parameters
Type | Name | Description |
---|---|---|
String | requestSignature | ej users request signature. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
String requestSignature;
thing.SetRequestSignature(requestSignature);
SetRole(NSRole)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetRole(NSRole role)
Parameters
Type | Name | Description |
---|---|---|
NSRole | NSRole | Users role for role-based security. Determines permissions and access rights for the user. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
NSRole role;
thing.SetRole(role);
SetTicketCategories(NSMDOListItem[])
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetTicketCategories(NSMDOListItem[] ticketCategories)
Parameters
Type | Name | Description |
---|---|---|
NSMDOListItem[] | ticketCategories | Request Ticket Categories assigned to the user. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
NSMDOListItem[] ticketCategories;
thing.SetTicketCategories(ticketCategories);
SetTooltip(String)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetTooltip(String tooltip)
Parameters
Type | Name | Description |
---|---|---|
String | tooltip | Tooltip or other description. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
String tooltip;
thing.SetTooltip(tooltip);
SetType(Integer)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetType(Integer type)
Parameters
Type | Name | Description |
---|---|---|
Integer | type | NSUser type 1=InternalAssociate, 2=ResourceAssociate, 3=ExternalAssociate, 4=AnonymousAssociate, 5=SystemAssociate See AssociateType. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Integer type;
thing.SetType(type);
SetUserGroup(NSUserGroup)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetUserGroup(NSUserGroup userGroup)
Parameters
Type | Name | Description |
---|---|---|
NSUserGroup | userGroup | The main user group that this user belongs to. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
NSUserGroup userGroup;
thing.SetUserGroup(userGroup);
SetUserName(String)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetUserName(String userName)
Parameters
Type | Name | Description |
---|---|---|
String | userName | User name, a.k.a. Login name. This might be an email address. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
String userName;
thing.SetUserName(userName);
SetWaitingForApproval(Bool)
SuperOffice User, with login credentials and an associated person.
Declaration
Void SetWaitingForApproval(Bool waitingForApproval)
Parameters
Type | Name | Description |
---|---|---|
Bool | waitingForApproval | The user is waiting for an administrator to approve/grant her/him access. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUser thing;
Bool waitingForApproval;
thing.SetWaitingForApproval(waitingForApproval);