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.

Syntaxe

VBScript

session.GetAllUsers (extend_option) 

Perl

$session->GetAllUsers(extend_option); 
Identificateur
Description
session
Objet Session représentant la session en cours d'accès à la base de données.
extend_option
A Long that specifies an Extended Name Option enumeration value.
Valeur de retour
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.

Exemple

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";
    }
}

Commentaires