Users

Description

Returns the collection of users associated with the schema repository. This is a read-only property; it can be viewed but not set.

Each element in the returned collection is a User Object.

Syntax

Perl


$adminSession->GetUsers(); 
Identifier
Description
adminSession
The AdminSession object representing the current schema repository access session.
Return value
A Users Object containing all of the users in the schema repository.

Example

Perl


use CQPerlExt;

#Create a DevOps Plan admin session
$adminSession= CQAdminSession::Build();

#Logon as admin
$adminSession->Logon( "admin", "admin", "" );

#Get the list of users in the repository.
$userList = $adminSession->GetUsers();

#Get the number of users
$numUsers = $userList->Count();

#Iterate through the users
for ( $x=0; $x<$numUsers; $x++ ) {
     #Get the specified item in the collection of users
     $userObj = $userList->Item( $x );
     #Get the name of the user
     $userName = $userObj->GetName();
}

CQAdminSession::Unbuild($adminSession);