Share via


SPGroup.AddUser method (String, String, String, String)

Adds the user who is specified by a particular user name, email address, display name, and notes to the group.

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

Syntax

'Declaration
Public Sub AddUser ( _
    loginName As String, _
    email As String, _
    name As String, _
    notes As String _
)
'Usage
Dim instance As SPGroup
Dim loginName As String
Dim email As String
Dim name As String
Dim notes As String

instance.AddUser(loginName, email, name, _
    notes)
public void AddUser(
    string loginName,
    string email,
    string name,
    string notes
)

Parameters

  • loginName
    Type: System.String

    The user name (DOMAIN\User_Alias) for the user to be added to group.

  • email
    Type: System.String

    The email address for the user to be added to group.

  • name
    Type: System.String

    The display name for the user to be added to group.

  • notes
    Type: System.String

    The notes for the user to be added to group.

See also

Reference

SPGroup class

SPGroup members

AddUser overload

Microsoft.SharePoint namespace