SubscribedDatabases

Description

Returns the collection of databases to which the user is subscribed.

This is a read-only property; it can be viewed but not set.

Each element in the returned collection is a Database object. If this returns an empty collection or the collection has zero elements, the user is subscribed to all databases.

Note: The return value for this method does not include any subscriptions through group membership. Thus, the returned set may not include a database the user actually is allowed to log into.

Syntax

VBScript


user.SubscribedDatabases 

Perl


$user->GetSubscribedDatabases(); 
Identifier
Description
user
A User object.
Return value
A Databases collection object containing the databases to which the user is subscribed.

Example

Perl


use CQPerlExt;

$adminsession = CQAdminSession::Build();

$adminsession->Logon("admin", "",  "2003.06.00");

if (defined($adminsession->Logon("admin", "",  "2003.06.00"))) {

   print "Error: Not logged into HCL Compass.. please log in \n";

}

$userObj = $adminsession->GetUser("admin");

$dblist = $userObj->GetSubscribedDatabases();

$numdbs = $dblist->Count();

print $numdbs;

CQAdminSession::Unbuild($adminsession);