CreateUser

설명

새 사용자를 작성한 후 이를 스키마 저장소에 연관시킵니다.

리턴된 오브젝트에는 정보가 포함되지 않습니다. 이 오브젝트에 사용자 정보를 추가하려면 값을 해당 특성에 지정하십시오. 사용자 특성에 대해 정보는 User 오브젝트를 참조하십시오.

구문

VBScript

adminSession.CreateUser(userName) 

Perl

$adminSession->CreateUser(userName); 
ID
설명
adminSession
현재 스키마 저장소 액세스 세션을 나타내는 AdminSession 오브젝트입니다.
userName
새 사용자에게 지정할 이름이 포함된 문자열입니다.
Return value
User 오브젝트입니다.

예제

VBScript

set adminSession = CreateObject("ClearQuest.AdminSession") 
adminSession.Logon "admin", "admin", ""

set newUserObj = adminSession.CreateUser ("jsmith") 

Perl

use CQPerlExt;


# Create a Rational ClearQuest admin session

my $adminSession = CQAdminSession::Build();



# Logon as admin

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



# Create the user "jsmith" object

my $newUserObj = $adminSession->CreateUser( "jsmith" );

die "Unable to create the user!\n" unless $newUserObj;



# Set the new user's password to secret

$newUserObj->SetPassword("secret");



# All done.

CQAdminSession::Unbuild($adminSession);

피드백