Difference between revisions of "User class"

From Catglobe Wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
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=Empty|Name=<nowiki>Clear</nowiki>|Inherited=array|Description=<nowiki>Remove all items in array</nowiki>}}
 +
{{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=Empty|Name=<nowiki>Foreach</nowiki>|Inherited=array|Parameters=
 +
{{CGscriptParameters_Template|Type=Function|Name=<nowiki>function</nowiki>|Description=<nowiki>A function that takes 1 parameter of the types in the array, and an optional 2nd parameter that is the index</nowiki>}}
 +
|Description=<nowiki>Filters a sequence of values based on a predicate.</nowiki>}}
 +
{{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 32:
 
{{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>}}
 +
|Description=<nowiki>Return index of the given element using ==, or -1.</nowiki>}}
 +
{{CGscriptMethods_Template|ReturnType=int|Name=<nowiki>IndexOfObject</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 using references, 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>OBSOLETE! Randomize the order of the elements in the current array. Multiple calls to this may return the same randomization, use a Random object to preserve randomization over multiple calls</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=Empty|Name=<nowiki>Randomize</nowiki>|Inherited=array|Parameters=
 +
{{CGscriptParameters_Template|Type=Random|Name=<nowiki>random</nowiki>|Description=<nowiki>Random object</nowiki>}}
 +
|Description=<nowiki>Randomize the order of the elements in the current array.</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 59:
 
{{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>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>CountryIsoCode</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Iso code of the country of the address</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>CountryIsoCode</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Iso code of the country of the address</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>CreatedByUserId</nowiki>|HasGetter=1|Description=<nowiki>Id of the user that created this user</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>CreatedByUserId</nowiki>|HasGetter=1|Description=<nowiki>Id of the user that created this user</nowiki>}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=<nowiki>CreatedByUserResourceId</nowiki>|HasGetter=1|Description=<nowiki>Resource id of the user that created this user</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>CreatedDate</nowiki>|HasGetter=1|Description=<nowiki>Date of creation</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=DateTime|Name=<nowiki>CreatedDate</nowiki>|HasGetter=1|Description=<nowiki>Date of creation</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>CultureIsoCode</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Iso code of the culture of the user</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>CultureIsoCode</nowiki>|HasGetter=1|HasSetter=1|Description=<nowiki>Iso code of the culture of the user</nowiki>}}
Line 85: Line 96:
 
{{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=int|Name=<nowiki>ModifiedByUserResourceId</nowiki>|HasGetter=1|Description=<nowiki>Resource 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>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
 
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
Line 105: Line 117:
 
{{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=
 
|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=
 
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>User_formatName</nowiki>|Parameters=
 
{{CGscriptParameters_Template|Type=User|Name=<nowiki>user</nowiki>|Description=<nowiki>User to save</nowiki>}}
 
{{CGscriptParameters_Template|Type=User|Name=<nowiki>user</nowiki>|Description=<nowiki>User to save</nowiki>}}
|Description=<nowiki>Generate full name ofuser</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_isMemberOfSampleRule</nowiki>|Parameters=
 +
{{CGscriptParameters_Template|Type=int|Name=<nowiki>userId</nowiki>|Description=<nowiki>id of user</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>sampleRuleId</nowiki>|Description=<nowiki>id of sample rule</nowiki>}}
 +
|Description=<nowiki>Returns whether a user is member of specified sample.</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=
 
{{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>}}
 
{{CGscriptParameters_Template|Type=int|Name=<nowiki>userResourceTemplateId</nowiki>|Description=<nowiki>Resource Id of the template</nowiki>}}
Line 128: Line 215:
 
{{CGscriptParameters_Template|Type=User|Name=<nowiki>user</nowiki>|Description=<nowiki>User to save</nowiki>}}
 
{{CGscriptParameters_Template|Type=User|Name=<nowiki>user</nowiki>|Description=<nowiki>User to save</nowiki>}}
 
|Description=<nowiki>Save the user</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>}}
 
}}
 
}}
=== <span style="color:#DF8621">'''Examples'''</span> ===
 
<source lang="javascript">
 
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
 
</source>
 

Latest revision as of 09:25, 25 April 2022

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) Empty Clear() - Remove all items in array
  • (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) Empty Foreach(Function function "A function that takes 1 parameter of the types in the array, and an optional 2nd parameter that is the index") - Filters a sequence of values based on a predicate.
  • (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 using ==, or -1.
  • (From array) int IndexOfObject(object element "Element to search for") - Return index of the given element using references, 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() - OBSOLETE! Randomize the order of the elements in the current array. Multiple calls to this may return the same randomization, use a Random object to preserve randomization over multiple calls
  • (From array) Empty Randomize(Random random "Random object") - 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
  • int CreatedByUserResourceId { get; } - Resource 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
  • int ModifiedByUserResourceId { get; } - Resource 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

  • Dictionary User_expirePoints(Array of int userResourceIds "Users to expire points for", DateTime fromDate "Expire points accumulated prior to this date", string description "User visible log entry associated with the transaction") - Test expire users points. Return dictionary of userResourceIds and number of points that would be expired
  • Dictionary User_expirePoints(Array of int userResourceIds "Users to expire points for", DateTime fromDate "Expire points accumulated prior to this date", string description "User visible log entry associated with the transaction", bool test "If true only return points that would be expired") - Expire users points. Return dictionary of userResourceIds and number of points expired
  • string User_formatName(User user "User to save") - Generate full name of user
  • string User_generateRandomNumericPassword() - Generate a new password with only digits
  • string User_generateRandomNumericPassword(int length "Length of generated password") - Generate a new password with only digits
  • string User_generateRandomPassword() - Generate a new password
  • string User_generateRandomPassword(int length "Length of generated password") - Generate a new password
  • User User_getCallingLoggedInUser() - Fetch current user filling out QAS on someone elses behalf
  • Array of Array User_getCommunicationHistory(int userResourceId "Reousrce id of user") - Get history of all attempts to communicate to a user.
  • User User_getCurrentUser() - Fetch current user. This will be impersonated user if set.
  • User User_getLoggedInUser() - Fetch current user before applying impersonation
  • int User_getPointsEarnedInPeriod(int userResourceId "Reousrce id of user", array fromDate "Date to calculate from", array toDate "Date to calculate to") - Get number of points earned in a period.
  • int User_getPointsUsedInPeriod(int userResourceId "Reousrce id of user", array fromDate "Date to calculate from", array toDate "Date to calculate to") - Get number of points used in a period.
  • User User_getQasUser() - Fetch user of the current QAS. May return Empty.
  • int User_getResourceIdFromUserId(int id "User id") - Map user id to user resource id
  • Array of int User_getResourceIdFromUserIds(Array of int ids "User ids") - Map user ids to user resource ids
  • int User_getRoleIdByName(string qualifiedName "Resource name of the resource template") - Get the resource template id of the resource template with the given name.
  • Array of Array User_getTransactionHistory(int userResourceId "Resource id of user") - Get history of all transactions for a user.
  • Array of Array User_getTransactionHistory(int userResourceId "Resource id of user", array fromDate "Date to calculate from", array toDate "Date to calculate to") - Get history of all transactions for a user in period.
  • User User_getUserByGuid(string guid "Guid of user") - Fetch existing user. Returns Empty if user doesnt exist
  • User User_getUserByResourceId(int resourceId "Resource id of user") - Fetch existing user. Returns Empty if user doesnt exist
  • User User_getUserByUsername(string username "Username of user") - Fetch existing user. Returns Empty if user doesnt exist
  • Array of User User_getUsersByEmail(string email "Email to search for") - Fetch existing users. Returns Empty if user doesnt exist
  • Array of User User_getUsersByEmail(int resourceTemplateResourceId "Limit users to this resource template", string email "Email to search for") - Fetch existing users. Returns Empty if user doesnt exist
  • Array of User User_getUsersByGroupResourceId(int groupResourceId "Resource id of group") - Fetch existing users.
  • Array of User User_getUsersByResourceIds(Array of int resourceIds "Resource ids of users") - Fetch existing users.
  • Empty User_insertPoints(int points "Number of points to add", string description "User visible log entry associated with the transaction") - Add points to user of current QAS.
  • Empty User_insertPoints(int points "Number of points to add", string description "User visible log entry associated with the transaction", int userResourceId "Resource Id of user that gets the points") - Add custom points to user.
  • bool User_isMemberOfSampleRule(int userId "id of user", int sampleRuleId "id of sample rule") - Returns whether a user is member of specified sample.
  • bool User_isValidUsername(string username "Username of user") - Return true if username is valid.
  • 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
  • bool User_usernameExists(string username "Username of user") - Check if a username already exists.
  • int User_withdrawPoints(int points "Number of points to remove", string description "User visible log entry associated with the transaction") - Remove points from user of current QAS. Returns 0 if count not withdraw the necessary amount.
  • int User_withdrawPoints(int points "Number of points to remove", string description "User visible log entry associated with the transaction", int userResourceId "Resource Id of user that gets the points") - Remove custom points from user. Returns 0 if count not withdraw the necessary amount.
  • int User_withdrawPoints(int points "Number of points to remove", string description "User visible log entry associated with the transaction", int userResourceId "Resource Id of user that gets the points", int customType "Store custom transaction type. Can be 1-127, or 0 for ManualTransaction") - Remove custom points from user. Returns 0 if count not withdraw the necessary amount.