use RT::User;
If passed a true value, makes this user a member of the "Privileged" PseudoGroup. Otherwise, makes this user a member of the "Unprivileged" pseudogroup.
Returns a standard RT tuple of (val, msg);
Returns true if this user is privileged. Returns undef otherwise.
Load a user object from the database. Takes a single argument. If the argument is numerical, load by the column 'id'. Otherwise, load by the "Name" column which is the user's textual username.
Tries to load this user object from the database by the user's email address.
Attempts to find a user who has the provided email address. If that fails, creates an unprivileged user with the provided email address. and loads them.
Returns a tuple of the user's id and a status message. 0 will be returned in place of the user's id in case of failure.
Returns true if the email address entered is not in use by another user or is undef or ''. Returns false if it's in use.
# CanonicalizeEmailAddress converts email addresses into canonical form. # it takes one email address in and returns the proper canonical # form. You can dump whatever your proper local config is in here
Takes no arguments. Returns a status code and a new password or an error message. If the status is 1, the second value returned is the new password. If the status is anything else, the new value returned is the error code.
Returns status, [ERROR or new password]. Resets this user\'s password to a randomly generated pronouncable password and emails them, using a global template called "RT_PasswordChange", which can be overridden with global templates "RT_PasswordChange_Privileged" or "RT_PasswordChange_NonPrivileged" for privileged and Non-privileged users respectively.
Returns a random password between MIN_LEN and MAX_LEN characters long.
Takes a string. Checks the string's length and sets this user's password to that string.
returns an MD5 hash of the password passed in, in base64 encoding.
Returns true if the passed in value is this user's password. Returns undef otherwise.
Toggles the user's disabled flag. If this flag is set, all password checks for this user will fail. All ACL checks for this user will fail. The user will appear in no user listings.
Returns the principal object for this user. returns an empty RT::Principal if there's no principal object matching this user. The response is cached. PrincipalObj should never ever change.
Returns this user's PrincipalId
Takes a paramhash which can contain these items: GroupObj => RT::Group or Group => integer Right => 'Right'
Returns 1 if this user has the right specified in the paramhash for the Group passed in.
Returns undef if they don't.
Shim around PrincipalObj->HasRight. See RT::Principal
If the user has rights for this object, either because he has 'AdminUsers' or (if he\'s trying to edit himself and the right isn\'t an admin right) 'ModifySelf', return 1. otherwise, return undef.
Takes the name of a table column. Returns its value as a string, if the user passes an ACL check