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)

Syntax

'Declaration
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)
public static bool IsLoginValid(
    SPGlobalAdmin globalAdmin,
    string strLoginName,
    out bool bIsUserAccount
)

Parameters

  • 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.

See also

Reference

SPUtility class

SPUtility members

IsLoginValid overload

Microsoft.SharePoint.Utilities namespace