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)
Available in Sandboxed Solutions: No
Syntax
'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)> _
Public Shared Function IsLoginValid ( _
globalAdmin As SPGlobalAdmin, _
strLoginName As String, _
<OutAttribute> ByRef bIsUserAccount As Boolean _
) As Boolean
'Usage
Dim globalAdmin As SPGlobalAdmin
Dim strLoginName As String
Dim bIsUserAccount As Boolean
Dim returnValue As Boolean
returnValue = SPUtility.IsLoginValid(globalAdmin, _
strLoginName, bIsUserAccount)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.UnsupportedSPType)]
public static bool IsLoginValid(
SPGlobalAdmin globalAdmin,
string strLoginName,
out bool bIsUserAccount
)
Parameters
globalAdmin
Type: Microsoft.SharePoint.Administration.SPGlobalAdminA Microsoft.SharePoint.Administration.SPGlobalAdmin object that represents global administrative settings for the server or server farm.
strLoginName
Type: System.StringA string that contains the user name.
bIsUserAccount
Type: System.Booleantrue 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.