GetPrimaryUser

Returns the primary profile for the specified user.

Syntax

IHierarchicalUser GetPrimaryUser(DirectoryEntry userDE)
IHierarchicalUser GetPrimaryUser(SearchResult userSR)
IHierarchicalUser GetPrimaryUser(string userDn)
IHierarchicalUser GetPrimaryUser(IAdsUser userIAds)

Parameters

Specify one of the following parameters when using this method.

Parameter Description

userDE

The directory entry for the user for which you want the primary profile.

userSr

The directory entry for a user specified as a search result.

userDn

The user specified as a distinguished name.

userIads

The IADs interface to the user.

Return value

The hierarchical user object that represents the user profile.

Discussion

The primary profile is the profile at the highest level in the zone hierarchy where the user’s profile is defined. All or part of the primary profile can be overridden by secondary profiles farther down in the hierarchy.

The GetPrimaryUser(DirectoryEntry userDE) and GetPrimaryUser(SearchResult userSr) methods are available only for .NET-based programs.

Exceptions

GetPrimaryUser throws an ArgumentNullException if the specified parameter value is null or empty, or if the user does not exist.