User class
Revision as of 08:58, 2 July 2020 by Administrator (talk | contribs)
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
- 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_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.