User class
From Catglobe Wiki
More actions
User
A user
Parent class
Inherits from Array
Methods
- Empty ChangePassword(string newPassword "The new password") - Change the users password
- Empty DeleteUser() - Delete the user
- Empty Save() - Save the user
- string ToString() - The string representation of the object.
- object this[] { get; }(int index "Index") - Backward-compatible indexer
- Empty this[] { get; }(int index "Index", object value "Value to set") - Backward-compatible indexer
Properties
- DateTime AccessExpiration { get; set; } - After this date the user can no longer login
- 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
- 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
- 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
- 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
- string TimezoneName { get; set; } - Iana Id of the timezone of the user. Notice not all ids are accepted
- 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 "Resource 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 "Resource id of user", DateTime fromDate "Date to calculate from", DateTime toDate "Date to calculate to") - Get number of points earned in a period.
- int User_getPointsUsedInPeriod(int userResourceId "Resource id of user", DateTime fromDate "Date to calculate from", DateTime 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") - Returns the resource id of the user with the given legacy user id.
- Array of int User_getResourceIdFromUserIds(Array of int ids "User ids") - Map legacy 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.
- int User_getRoleResourceIdByName(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", DateTime fromDate "Date to calculate from", DateTime 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.