GetAllUsers
Description
Returns an array that contains the names of all the users the current user can view. The result includes at least the current user and the other users that are members of the same groups as that user. If the current user has the All Users and Groups Visible privilege, the list includes all users that are subscribed to the database.
Syntax
VBScript
session.GetAllUsers (extend_option)
Perl
$session->GetAllUsers
(extend_option);
- Identifier
- Description
- session
- The Session object that represents the current database-access session.
- extend_option
- A Long that specifies an Extended Name Option enumeration value.
- Return value
- For Visual Basic, a Variant containing an Array
of Strings is returned. Each String contains the name of a user .
For Perl, returns a reference to an array of strings containing the names of all users a user can see.
Example
Perl
sub show_all_users()
{
my $users;
eval {
$users = $session->GetAllUsers($CQPerlExt::CQ_NAME_EXTEND_WHEN_NEEDED);
};
if ($@) {
print "WARNING: failed to get all users: $@\n";
} else {
my $user;
print "All users:";
foreach $user (sort @$users) {
print " $user";
}
print "\n";
}
}