Difference between revisions of "User class"
Line 2: | Line 2: | ||
|Name=<nowiki>User</nowiki> | |Name=<nowiki>User</nowiki> | ||
|Description=<nowiki>A user</nowiki> | |Description=<nowiki>A user</nowiki> | ||
− | |Methods= | + | |InheritsFrom=Array|Methods= |
− | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Any</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Any</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>predicate</nowiki>|Description=<nowiki>A function that takes 1 parameter of the types in the array, and return true/false</nowiki>}} | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>predicate</nowiki>|Description=<nowiki>A function that takes 1 parameter of the types in the array, and return true/false</nowiki>}} | ||
|Description=<nowiki>Return true if the array contains the element using the given function.</nowiki>}} | |Description=<nowiki>Return true if the array contains the element using the given function.</nowiki>}} | ||
Line 9: | Line 9: | ||
{{CGscriptParameters_Template|Type=string|Name=<nowiki>newPassword</nowiki>|Description=<nowiki>The new password</nowiki>}} | {{CGscriptParameters_Template|Type=string|Name=<nowiki>newPassword</nowiki>|Description=<nowiki>The new password</nowiki>}} | ||
|Description=<nowiki>Change the users password</nowiki>}} | |Description=<nowiki>Change the users password</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Contains</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>Contains</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=object|Name=<nowiki>element</nowiki>|Description=<nowiki>Element to check for</nowiki>}} | {{CGscriptParameters_Template|Type=object|Name=<nowiki>element</nowiki>|Description=<nowiki>Element to check for</nowiki>}} | ||
|Description=<nowiki>Return true if the array contains the element using the normal equal operator.</nowiki>}} | |Description=<nowiki>Return true if the array contains the element using the normal equal operator.</nowiki>}} | ||
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>DeleteUser</nowiki>|Description=<nowiki>Delete the user</nowiki>}} | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>DeleteUser</nowiki>|Description=<nowiki>Delete the user</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Except</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Except</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=array|Name=<nowiki>elements</nowiki>|Description=<nowiki>Elements to remove</nowiki>}} | {{CGscriptParameters_Template|Type=array|Name=<nowiki>elements</nowiki>|Description=<nowiki>Elements to remove</nowiki>}} | ||
|Description=<nowiki>Return all elements that does not exist in the other collection.</nowiki>}} | |Description=<nowiki>Return all elements that does not exist in the other collection.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>First</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>First</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>selector</nowiki>|Description=<nowiki>A function to test each element for a condition.</nowiki>}} | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>selector</nowiki>|Description=<nowiki>A function to test each element for a condition.</nowiki>}} | ||
|Description=<nowiki>Returns the first element in a sequence that satisfies a specified condition.</nowiki>}} | |Description=<nowiki>Returns the first element in a sequence that satisfies a specified condition.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>FirstOrDefault</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=object|Name=<nowiki>FirstOrDefault</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>selector</nowiki>|Description=<nowiki>A function to test each element for a condition.</nowiki>}} | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>selector</nowiki>|Description=<nowiki>A function to test each element for a condition.</nowiki>}} | ||
|Description=<nowiki>Returns the first element in a sequence that satisfies a specified condition or empty if not found.</nowiki>}} | |Description=<nowiki>Returns the first element in a sequence that satisfies a specified condition or empty if not found.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>Frequency</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>Frequency</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=number|Name=<nowiki>number</nowiki>|Description=<nowiki>The number to search for</nowiki>}} | {{CGscriptParameters_Template|Type=number|Name=<nowiki>number</nowiki>|Description=<nowiki>The number to search for</nowiki>}} | ||
|Description=<nowiki>Counts the number of times a given Number object exists in the Array. Can only use if all the elements are of type Number</nowiki>}} | |Description=<nowiki>Counts the number of times a given Number object exists in the Array. Can only use if all the elements are of type Number</nowiki>}} | ||
Line 28: | Line 28: | ||
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>}} | {{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>}} | ||
|Description=<nowiki>Backward-compatible indexer</nowiki>}} | |Description=<nowiki>Backward-compatible indexer</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>IndexOf</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>IndexOf</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=object|Name=<nowiki>element</nowiki>|Description=<nowiki>Element to search for</nowiki>}} | {{CGscriptParameters_Template|Type=object|Name=<nowiki>element</nowiki>|Description=<nowiki>Element to search for</nowiki>}} | ||
|Description=<nowiki>Return index of the given element, or -1.</nowiki>}} | |Description=<nowiki>Return index of the given element, or -1.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>IsCharacterArray</nowiki>|Description=<nowiki>check if array is an array of characters</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>IsCharacterArray</nowiki>|Inherited=array|Description=<nowiki>check if array is an array of characters</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>IsNumericArray</nowiki>|Description=<nowiki>check if array is an array of integer numbers</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>IsNumericArray</nowiki>|Inherited=array|Description=<nowiki>check if array is an array of integer numbers</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>IsStringArray</nowiki>|Description=<nowiki>check if array is an array of string</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>IsStringArray</nowiki>|Inherited=array|Description=<nowiki>check if array is an array of string</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>OrderBy</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>OrderBy</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>comparer</nowiki>|Description=<nowiki>Function that compares two objects of the same type. Must return a signed integer that indicates the relative values of first param A and second param B. Value Less than 0 : A is less than B.Value 0 : A equals B.Value Greater than 0 : A is greater than B.It can also be a function that takes 1 parameter and returns a string or number.</nowiki>}} | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>comparer</nowiki>|Description=<nowiki>Function that compares two objects of the same type. Must return a signed integer that indicates the relative values of first param A and second param B. Value Less than 0 : A is less than B.Value 0 : A equals B.Value Greater than 0 : A is greater than B.It can also be a function that takes 1 parameter and returns a string or number.</nowiki>}} | ||
|Description=<nowiki>Sorts the elements of a sequence in ascending order by using a specified comparer.</nowiki>}} | |Description=<nowiki>Sorts the elements of a sequence in ascending order by using a specified comparer.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Randomize</nowiki>|Description=<nowiki>Randomize the order of the elements in the current array.</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Randomize</nowiki>|Inherited=array|Description=<nowiki>Randomize the order of the elements in the current array.</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Reverse</nowiki>|Description=<nowiki>Returns an array with all the elements in the opposite order.</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Reverse</nowiki>|Inherited=array|Description=<nowiki>Returns an array with all the elements in the opposite order.</nowiki>}} |
{{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save the user</nowiki>}} | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>Save</nowiki>|Description=<nowiki>Save the user</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Select</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Select</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>selector</nowiki>|Description=<nowiki>A transform function to apply to each element.</nowiki>}} | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>selector</nowiki>|Description=<nowiki>A transform function to apply to each element.</nowiki>}} | ||
|Description=<nowiki>Projects each element of a sequence into a new form.</nowiki>}} | |Description=<nowiki>Projects each element of a sequence into a new form.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>SelectMany</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>SelectMany</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>selector</nowiki>|Description=<nowiki>A transform function to get each sub array.</nowiki>}} | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>selector</nowiki>|Description=<nowiki>A transform function to get each sub array.</nowiki>}} | ||
|Description=<nowiki>Projects each array element of a sequence into a new form.</nowiki>}} | |Description=<nowiki>Projects each array element of a sequence into a new form.</nowiki>}} | ||
Line 49: | Line 49: | ||
{{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to set</nowiki>}} | {{CGscriptParameters_Template|Type=int|Name=<nowiki>index</nowiki>|Description=<nowiki>Index</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=object|Name=<nowiki>value</nowiki>|Description=<nowiki>Value to set</nowiki>}} | ||
|Description=<nowiki>Backward-compatible indexer</nowiki>}} | |Description=<nowiki>Backward-compatible indexer</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Skip</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Skip</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=int|Name=<nowiki>n</nowiki>|Description=<nowiki>How many elements to skip</nowiki>}} | {{CGscriptParameters_Template|Type=int|Name=<nowiki>n</nowiki>|Description=<nowiki>How many elements to skip</nowiki>}} | ||
|Description=<nowiki>Get all but the n first elements.</nowiki>}} | |Description=<nowiki>Get all but the n first elements.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Take</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Take</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=int|Name=<nowiki>n</nowiki>|Description=<nowiki>How many elements to take</nowiki>}} | {{CGscriptParameters_Template|Type=int|Name=<nowiki>n</nowiki>|Description=<nowiki>How many elements to take</nowiki>}} | ||
|Description=<nowiki>Get the n first elements.</nowiki>}} | |Description=<nowiki>Get the n first elements.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>ToDictionary</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>ToDictionary</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>keySelector</nowiki>|Description=<nowiki>A transform function to get the key of each element.</nowiki>}} | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>keySelector</nowiki>|Description=<nowiki>A transform function to get the key of each element.</nowiki>}} | ||
|Description=<nowiki>Return a dictionary with the elements of the array.</nowiki>}} | |Description=<nowiki>Return a dictionary with the elements of the array.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>ToDictionary</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>ToDictionary</nowiki>|Inherited=array|Parameters= |
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>keySelector</nowiki>|Description=<nowiki>A transform function to get the key of each element.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Function|Name=<nowiki>valueSelector</nowiki>|Description=<nowiki>A transform function to get the value of each element.</nowiki>}} | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>keySelector</nowiki>|Description=<nowiki>A transform function to get the key of each element.</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=Function|Name=<nowiki>valueSelector</nowiki>|Description=<nowiki>A transform function to get the value of each element.</nowiki>}} | ||
|Description=<nowiki>Return a dictionary with the elements of the array.</nowiki>}} | |Description=<nowiki>Return a dictionary with the elements of the array.</nowiki>}} | ||
− | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}} | + | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Inherited=Array|Description=<nowiki>The string representation of the object.</nowiki>}} |
− | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Where</nowiki>|Parameters= | + | {{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>Where</nowiki>|Inherited=array|Parameters= |
− | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>predicate</nowiki>|Description=<nowiki>A function that takes 1 parameter of the types in the array and return true/false</nowiki>}} | + | {{CGscriptParameters_Template|Type=Function|Name=<nowiki>predicate</nowiki>|Description=<nowiki>A function that takes 1 parameter of the types in the array, and an optional 2nd parameter that is the index and return true/false</nowiki>}} |
|Description=<nowiki>Filters a sequence of values based on a predicate.</nowiki>}} | |Description=<nowiki>Filters a sequence of values based on a predicate.</nowiki>}} | ||
|Properties= | |Properties= | ||
{{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>AccessExpiration</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>After this date the user can no longer login</nowiki>}} | {{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>AccessExpiration</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>After this date the user can no longer login</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Average</nowiki>|HasGetter=1|Description=<nowiki>Average of the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Average</nowiki>|HasGetter=1|Inherited=array|Description=<nowiki>Average of the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} |
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>CalculatedManHours</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>True if it Man Hours is calculated. Set to true to recalculate.</nowiki>}} | {{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>CalculatedManHours</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>True if it Man Hours is calculated. Set to true to recalculate.</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>City</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>City of the address</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>City</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>City of the address</nowiki>}} | ||
Line 85: | Line 85: | ||
{{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>LastDateUpdatePassWord</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Date the user last changed their password</nowiki>}} | {{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>LastDateUpdatePassWord</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Date the user last changed their password</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>LastName</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>LastName of the user</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>LastName</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>LastName of the user</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Max</nowiki>|HasGetter=1|Description=<nowiki>Largest of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Max</nowiki>|HasGetter=1|Inherited=array|Description=<nowiki>Largest of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} |
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>MiddleName</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>MiddleName of the user</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>MiddleName</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>MiddleName of the user</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Min</nowiki>|HasGetter=1|Description=<nowiki>Smallest of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Min</nowiki>|HasGetter=1|Inherited=array|Description=<nowiki>Smallest of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} |
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ModifiedByUserId</nowiki>|HasGetter=1|Description=<nowiki>Id of the user that modified this user</nowiki>}} | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ModifiedByUserId</nowiki>|HasGetter=1|Description=<nowiki>Id of the user that modified this user</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>ModifiedDate</nowiki>|HasGetter=1|Description=<nowiki>Date of last modification</nowiki>}} | {{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>ModifiedDate</nowiki>|HasGetter=1|Description=<nowiki>Date of last modification</nowiki>}} | ||
Line 105: | Line 105: | ||
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceTemplateResourceId</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Resource Id of the template</nowiki>}} | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>ResourceTemplateResourceId</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Resource Id of the template</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>StreetAddress</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Street of the address</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>StreetAddress</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Street of the address</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Sum</nowiki>|HasGetter=1|Description=<nowiki>Sum of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=number|Name=<nowiki>Sum</nowiki>|HasGetter=1|Inherited=array|Description=<nowiki>Sum of all the objects in the Array object. Can only use if all the elements are of type Number</nowiki>}} |
{{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>TimeRegEnabled</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>True if it is possible to register time for this resource</nowiki>}} | {{CGscriptProperties_Template|ReturnType=bool|Name=<nowiki>TimeRegEnabled</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>True if it is possible to register time for this resource</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>TimezoneId</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Id of the timezone of the user</nowiki>}} | {{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>TimezoneId</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Id of the timezone of the user</nowiki>}} | ||
− | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}} | + | {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Inherited=object|Description=<nowiki>Get information about this class.</nowiki>}} |
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Username</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Login username of the user</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Username</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Login username of the user</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Website</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Website of the address</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>Website</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Website of the address</nowiki>}} | ||
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ZipCode</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>ZipCode of the address</nowiki>}} | {{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ZipCode</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>ZipCode of the address</nowiki>}} | ||
+ | |StaticMethods= | ||
+ | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>User_expirePoints</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>userResourceIds</nowiki>|Description=<nowiki>Users to expire points for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>fromDate</nowiki>|Description=<nowiki>Expire points accumulated prior to this date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>}} | ||
+ | |Description=<nowiki>Test expire users points. Return dictionary of userResourceIds and number of points that would be expired</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>User_expirePoints</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>userResourceIds</nowiki>|Description=<nowiki>Users to expire points for</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=DateTime|Name=<nowiki>fromDate</nowiki>|Description=<nowiki>Expire points accumulated prior to this date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=<nowiki>test</nowiki>|Description=<nowiki>If true only return points that would be expired</nowiki>}} | ||
+ | |Description=<nowiki>Expire users points. Return dictionary of userResourceIds and number of points expired</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>User_formatName</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=User|Name=<nowiki>user</nowiki>|Description=<nowiki>User to save</nowiki>}} | ||
+ | |Description=<nowiki>Generate full name of user</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>User_generateRandomNumericPassword</nowiki>|Description=<nowiki>Generate a new password with only digits</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>User_generateRandomNumericPassword</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>length</nowiki>|Description=<nowiki>Length of generated password</nowiki>}} | ||
+ | |Description=<nowiki>Generate a new password with only digits</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>User_generateRandomPassword</nowiki>|Description=<nowiki>Generate a new password</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>User_generateRandomPassword</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>length</nowiki>|Description=<nowiki>Length of generated password</nowiki>}} | ||
+ | |Description=<nowiki>Generate a new password</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_getCallingLoggedInUser</nowiki>|Description=<nowiki>Fetch current user filling out QAS on someone elses behalf</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of Array|Name=<nowiki>User_getCommunicationHistory</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Reousrce id of user</nowiki>}} | ||
+ | |Description=<nowiki>Get history of all attempts to communicate to a user.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_getCurrentUser</nowiki>|Description=<nowiki>Fetch current user. This will be impersonated user if set.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_getLoggedInUser</nowiki>|Description=<nowiki>Fetch current user before applying impersonation</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_getPointsEarnedInPeriod</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Reousrce id of user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>fromDate</nowiki>|Description=<nowiki>Date to calculate from</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>toDate</nowiki>|Description=<nowiki>Date to calculate to</nowiki>}} | ||
+ | |Description=<nowiki>Get number of points earned in a period.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_getPointsUsedInPeriod</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Reousrce id of user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>fromDate</nowiki>|Description=<nowiki>Date to calculate from</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>toDate</nowiki>|Description=<nowiki>Date to calculate to</nowiki>}} | ||
+ | |Description=<nowiki>Get number of points used in a period.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_getQasUser</nowiki>|Description=<nowiki>Fetch user of the current QAS. May return Empty.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_getResourceIdFromUserId</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>id</nowiki>|Description=<nowiki>User id</nowiki>}} | ||
+ | |Description=<nowiki>Map user id to user resource id</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of ints|Name=<nowiki>User_getResourceIdFromUserIds</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>ids</nowiki>|Description=<nowiki>User ids</nowiki>}} | ||
+ | |Description=<nowiki>Map user ids to user resource ids</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_getRoleIdByName</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>qualifiedName</nowiki>|Description=<nowiki>Resource name of the resource template</nowiki>}} | ||
+ | |Description=<nowiki>Get the resource template id of the resource template with the given name.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of Array|Name=<nowiki>User_getTransactionHistory</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Resource id of user</nowiki>}} | ||
+ | |Description=<nowiki>Get history of all transactions for a user.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of Array|Name=<nowiki>User_getTransactionHistory</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Resource id of user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>fromDate</nowiki>|Description=<nowiki>Date to calculate from</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>toDate</nowiki>|Description=<nowiki>Date to calculate to</nowiki>}} | ||
+ | |Description=<nowiki>Get history of all transactions for a user in period.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_getUserByGuid</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>guid</nowiki>|Description=<nowiki>Guid of user</nowiki>}} | ||
+ | |Description=<nowiki>Fetch existing user. Returns Empty if user doesnt exist</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_getUserByResourceId</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>resourceId</nowiki>|Description=<nowiki>Resource id of user</nowiki>}} | ||
+ | |Description=<nowiki>Fetch existing user. Returns Empty if user doesnt exist</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_getUserByUsername</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>username</nowiki>|Description=<nowiki>Username of user</nowiki>}} | ||
+ | |Description=<nowiki>Fetch existing user. Returns Empty if user doesnt exist</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of User|Name=<nowiki>User_getUsersByEmail</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>email</nowiki>|Description=<nowiki>Email to search for</nowiki>}} | ||
+ | |Description=<nowiki>Fetch existing users. Returns Empty if user doesnt exist</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of User|Name=<nowiki>User_getUsersByEmail</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>resourceTemplateResourceId</nowiki>|Description=<nowiki>Limit users to this resource template</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>email</nowiki>|Description=<nowiki>Email to search for</nowiki>}} | ||
+ | |Description=<nowiki>Fetch existing users. Returns Empty if user doesnt exist</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of User|Name=<nowiki>User_getUsersByGroupResourceId</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>groupResourceId</nowiki>|Description=<nowiki>Resource id of group</nowiki>}} | ||
+ | |Description=<nowiki>Fetch existing users.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Array of User|Name=<nowiki>User_getUsersByResourceIds</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=Array of ints|Name=<nowiki>resourceIds</nowiki>|Description=<nowiki>Resource ids of users</nowiki>}} | ||
+ | |Description=<nowiki>Fetch existing users.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>User_insertPoints</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>points</nowiki>|Description=<nowiki>Number of points to add</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>}} | ||
+ | |Description=<nowiki>Add points to user of current QAS.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>User_insertPoints</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>points</nowiki>|Description=<nowiki>Number of points to add</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Resource Id of user that gets the points</nowiki>}} | ||
+ | |Description=<nowiki>Add custom points to user.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>User_isValidUsername</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>username</nowiki>|Description=<nowiki>Username of user</nowiki>}} | ||
+ | |Description=<nowiki>Return true if username is valid.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_new</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceTemplateId</nowiki>|Description=<nowiki>Resource Id of the template</nowiki>}} | ||
+ | |Description=<nowiki>Create a new user instance</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_new</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceTemplateId</nowiki>|Description=<nowiki>Resource Id of the template</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>mask</nowiki>|Description=<nowiki>Mask to use to generate username</nowiki>}} | ||
+ | |Description=<nowiki>Create a new user instance</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=User|Name=<nowiki>User_new</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>username</nowiki>|Description=<nowiki>Username of new user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>password</nowiki>|Description=<nowiki>Password of new user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceTemplateId</nowiki>|Description=<nowiki>Resource Id of the template</nowiki>}} | ||
+ | |Description=<nowiki>Create a new user instance</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=Empty|Name=<nowiki>User_save</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=User|Name=<nowiki>user</nowiki>|Description=<nowiki>User to save</nowiki>}} | ||
+ | |Description=<nowiki>Save the user</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=bool|Name=<nowiki>User_usernameExists</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=string|Name=<nowiki>username</nowiki>|Description=<nowiki>Username of user</nowiki>}} | ||
+ | |Description=<nowiki>Check if a username already exists.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_withdrawPoints</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>points</nowiki>|Description=<nowiki>Number of points to remove</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>}} | ||
+ | |Description=<nowiki>Remove points from user of current QAS. Returns 0 if count not withdraw the necessary amount.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_withdrawPoints</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>points</nowiki>|Description=<nowiki>Number of points to remove</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Resource Id of user that gets the points</nowiki>}} | ||
+ | |Description=<nowiki>Remove custom points from user. Returns 0 if count not withdraw the necessary amount.</nowiki>}} | ||
+ | {{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>User_withdrawPoints</nowiki>|Parameters= | ||
+ | {{CGscriptParameters_Template|Type=int|Name=<nowiki>points</nowiki>|Description=<nowiki>Number of points to remove</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=<nowiki>description</nowiki>|Description=<nowiki>User visible log entry associated with the transaction</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceId</nowiki>|Description=<nowiki>Resource Id of user that gets the points</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>customType</nowiki>|Description=<nowiki>Store custom transaction type. Can be 1-127, or 0 for ManualTransaction</nowiki>}} | ||
+ | |Description=<nowiki>Remove custom points from user. Returns 0 if count not withdraw the necessary amount.</nowiki>}} | ||
|StaticMethods= | |StaticMethods= | ||
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>User_formatName</nowiki>|Parameters= | {{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>User_formatName</nowiki>|Parameters= |
Revision as of 08:18, 2 July 2020
User
A user
Parent class
Inherits from Array
Methods
- (From array) bool Any(Function predicate "A function that takes 1 parameter of the types in the array, and return true/false") - Return true if the array contains the element using the given function.
- Empty ChangePassword(string newPassword "The new password") - Change the users password
- (From array) bool Contains(object element "Element to check for") - Return true if the array contains the element using the normal equal operator.
- Empty DeleteUser() - Delete the user
- (From array) array Except(array elements "Elements to remove") - Return all elements that does not exist in the other collection.
- (From array) object First(Function selector "A function to test each element for a condition.") - Returns the first element in a sequence that satisfies a specified condition.
- (From array) object FirstOrDefault(Function selector "A function to test each element for a condition.") - Returns the first element in a sequence that satisfies a specified condition or empty if not found.
- (From array) int Frequency(number number "The number to search for") - Counts the number of times a given Number object exists in the Array. Can only use if all the elements are of type Number
- object this[] { get; }(int index "Index") - Backward-compatible indexer
- (From array) int IndexOf(object element "Element to search for") - Return index of the given element, or -1.
- (From array) bool IsCharacterArray() - check if array is an array of characters
- (From array) bool IsNumericArray() - check if array is an array of integer numbers
- (From array) bool IsStringArray() - check if array is an array of string
- (From array) array OrderBy(Function comparer "Function that compares two objects of the same type. Must return a signed integer that indicates the relative values of first param A and second param B. Value Less than 0 : A is less than B.Value 0 : A equals B.Value Greater than 0 : A is greater than B.It can also be a function that takes 1 parameter and returns a string or number.") - Sorts the elements of a sequence in ascending order by using a specified comparer.
- (From array) Empty Randomize() - Randomize the order of the elements in the current array.
- (From array) array Reverse() - Returns an array with all the elements in the opposite order.
- Empty Save() - Save the user
- (From array) array Select(Function selector "A transform function to apply to each element.") - Projects each element of a sequence into a new form.
- (From array) array SelectMany(Function selector "A transform function to get each sub array.") - Projects each array element of a sequence into a new form.
- Empty this[] { set; }(int index "Index", object value "Value to set") - Backward-compatible indexer
- (From array) array Skip(int n "How many elements to skip") - Get all but the n first elements.
- (From array) array Take(int n "How many elements to take") - Get the n first elements.
- (From array) Dictionary ToDictionary(Function keySelector "A transform function to get the key of each element.") - Return a dictionary with the elements of the array.
- (From array) Dictionary ToDictionary(Function keySelector "A transform function to get the key of each element.", Function valueSelector "A transform function to get the value of each element.") - Return a dictionary with the elements of the array.
- (From Array) string ToString() - The string representation of the object.
- (From array) array Where(Function predicate "A function that takes 1 parameter of the types in the array, and an optional 2nd parameter that is the index and return true/false") - Filters a sequence of values based on a predicate.
Properties
- DateTime AccessExpiration { get; set; } - After this date the user can no longer login
- (From array) number Average { get; } - Average of the objects in the Array object. Can only use if all the elements are of type Number
- bool CalculatedManHours { get; set; } - True if it Man Hours is calculated. Set to true to recalculate.
- string City { get; set; } - City of the address
- string CountryIsoCode { get; set; } - Iso code of the country of the address
- int CreatedByUserId { get; } - Id of the user that created this user
- DateTime CreatedDate { get; } - Date of creation
- string CultureIsoCode { get; set; } - Iso code of the culture of the user
- string CurrencyIsoName { get; set; } - Iso 4217 name of the currency of the user
- bool Deleted { get; } - True if deleted
- DateTime DeletedDate { get; } - Date of deletion
- bool Disabled { get; set; } - True if user is disabled
- DateTime DisabledDate { get; set; } - Date user was disabled
- string DiscountName { get; set; } - Current applied discount in webshop
- string Email { get; set; } - Email of the user
- string FirstName { get; set; } - Firstname of the user
- string LanguageIsoCode { get; set; } - Iso code of the language of the user
- DateTime LastDateUpdatePassWord { get; set; } - Date the user last changed their password
- string LastName { get; set; } - LastName of the user
- (From array) number Max { get; } - Largest of all the objects in the Array object. Can only use if all the elements are of type Number
- string MiddleName { get; set; } - MiddleName of the user
- (From array) number Min { get; } - Smallest of all the objects in the Array object. Can only use if all the elements are of type Number
- int ModifiedByUserId { get; } - Id of the user that modified this user
- DateTime ModifiedDate { get; } - Date of last modification
- string ObjectTypeName { get; } - The name of the type of object.
- int ParentResourceId { get; set; } - Resource id of the parent
- array PhoneNumbers { get; set; } - Get/set phonenumbers
- int PointBalance { get; } - Currenct number of points available
- string Postbox { get; set; } - Postbox of the address
- int PrimaryKey { get; } - Id of the user
- DateTime ProtectedUntilDate { get; set; } - Prior to this date the user can not be sampled
- string Region { get; set; } - Region of the address
- string ResourceGuid { get; } - Guid of the user
- int ResourceId { get; } - Resource id of the user
- int ResourceManHours { get; set; } - Man Hours of the user
- string ResourceManHoursAsString { get; } - Formatted Man Hours as Hours:Min
- int ResourceTemplateId { get; } - Id of the template
- int ResourceTemplateResourceId { get; set; } - Resource Id of the template
- string StreetAddress { get; set; } - Street of the address
- (From array) number Sum { get; } - Sum of all the objects in the Array object. Can only use if all the elements are of type Number
- bool TimeRegEnabled { get; set; } - True if it is possible to register time for this resource
- int TimezoneId { get; set; } - Id of the timezone of the user
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
- string Username { get; set; } - Login username of the user
- string Website { get; set; } - Website of the address
- string ZipCode { get; set; } - ZipCode of the address
Static Methods
- string User_formatName(User user "User to save") - Generate full name ofuser
- User User_new(int userResourceTemplateId "Resource Id of the template") - Create a new user instance
- User User_new(int userResourceTemplateId "Resource Id of the template", string mask "Mask to use to generate username") - Create a new user instance
- User User_new(string username "Username of new user", string password "Password of new user", int userResourceTemplateId "Resource Id of the template") - Create a new user instance
- Empty User_save(User user "User to save") - Save the user
Examples
number userResourceTemplateRId = 1842;
User user = User_new (userResourceTemplateRId);
user.ParentResourceId = 5224516;
user.LanguageIsoCode = "da-DK";
user.CultureIsoCode = "da-DK";
user.Save();
print(user);//User class