CreateUser
Description
Creates a new user and associates it with the schema repository.
The returned object contains no information. To add user information to this object, assign values to its properties. For information on user properties, see the User Object.
Syntax
Perl
$adminSession->CreateUser(userName);
- Identifier
- Description
- adminSession
- The AdminSession object representing the current schema repository access session.
- userName
- A String containing the name you want to give to the new user.
- Return value
- A new User Object.
Example
Perl
use CQPerlExt;
# Create an 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);