ProGet SDK Reference
Version:

TryGetUser(string userName) Method

Returns a IUserDirectoryUser for the user with the specified user name.

Syntax

public virtual IUserDirectoryUser TryGetUser(string userName)

Parameters

userName
Type: string

The user name of the user to look up.

Returns

A corresponding IUserDirectoryUser for the specified user name, if the user was found in the directory; otherwise null (Nothing in Visual Basic).

Exceptions

System.ArgumentNullException

userName is null (Nothing in Visual Basic) or empty.