SPUtility.IsLoginValid method (SPGlobalAdmin, String, Boolean)

Uses the specified global administration object to determine whether the specified user name is valid and whether it corresponds to a user account.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static bool IsLoginValid(
	SPGlobalAdmin globalAdmin,
	string strLoginName,
	out bool bIsUserAccount
)

Parameters

globalAdmin
Type: Microsoft.SharePoint.Administration.SPGlobalAdmin

A Microsoft.SharePoint.Administration.SPGlobalAdmin object that represents global administrative settings for the server or server farm.

strLoginName
Type: System.String

A string that contains the user name.

bIsUserAccount
Type: System.Boolean

true to specify that the account is a user account; otherwise, false.

Return value

Type: System.Boolean
If true, the user name is valid; otherwise, false.
Show: