Users

説明

スキーマ リポジトリに関連付けられたユーザーのコレクションを戻します。これは読み取り専用のプロパティです。表示できますが設定できません。

戻されたコレクション内の各エレメントは User オブジェクトです。

構文

VBScript

adminSession.Users 

Perl

$adminSession->GetUsers(); 
識別子
説明
adminSession
AdminSession オブジェクトは、現在のスキーマ リポジトリのアクセス セッションを表します。
戻り値
スキーマ リポジトリ内のすべてのユーザーを含む Users オブジェクト

VBScript

set adminSession = CreateObject("ClearQuest.AdminSession")
set Session = CreateObject("ClearQuest.Session")

adminSession.Logon "admin", "admin", ""

set userList = adminSession.Users

For each userObj in userList
  userName = userObj.Name
  SessionObj.OutputDebugString "Found user: " & userName
Next

Perl

use CQPerlExt;

#Create a Rational ClearQuest 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);

フィードバック