RT 5.0.1 Documentation

RT::Users

Go to latest version →

NAME

  RT::Users - Collection of RT::User objects

SYNOPSIS

  use RT::Users;

DESCRIPTION

METHODS

PrincipalsAlias

Returns the string that represents this Users object's primary "Principals" alias.

LimitToEnabled

Only find items that haven't been disabled

LimitToDeleted

Only find items that have been deleted.

LimitToEmail

Takes one argument. an email address. limits the returned set to that email address

MemberOfGroup PRINCIPAL_ID

takes one argument, a group's principal id. Limits the returned set to members of a given group

LimitToPrivileged

Limits to users who can be made members of ACLs and groups

LimitToUnprivileged

Limits to unprivileged users only

WhoHaveRight { Right => 'name', Object => $rt_object , IncludeSuperusers => undef, IncludeSubgroupMembers => undef, IncludeSystemRights => undef, EquivObjects => [ ] }

find all users who the right Right for this group, either individually or as members of groups

If passed a queue object, with no id, it will find users who have that right for _any_ queue

WhoBelongToGroups { Groups => ARRAYREF, IncludeSubgroupMembers => 1, IncludeUnprivileged => 0 }

Return members who belong to any of the groups passed in the groups whose IDs are included in the Groups arrayref.

If IncludeSubgroupMembers is true (default) then members of any group that's a member of one of the passed groups are returned. If it's cleared then only direct member users are returned.

If IncludeUnprivileged is false (default) then only privileged members are returned; otherwise either privileged or unprivileged group members may be returned.

SimpleSearch

Does a 'simple' search of Users against a specified Term.

This Term is compared to a number of fields using various types of SQL comparison operators.

Ensures that the returned collection of Users will have a value for Return.

This method is passed the following. You must specify a Term and a Return.

    Privileged - Whether or not to limit to Privileged Users (0 or 1)
    Fields     - Hashref of data - defaults to C<$UserSearchFields> emulate that if you want to override
    Term       - String that is in the fields specified by Fields
    Return     - What field on the User you want to be sure isn't empty
    Exclude    - Array reference of ids to exclude
    Max        - What to limit this collection to
← Back to index