Share via


SPRole.AddUser method

NOTE: This API is now obsolete.

Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the AddUser method added the specified user to the role and is maintained for backward compatibility.)

Overload list

  Name Description
Public method AddUser(SPUser) Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the AddUser method added the specified user to the role and is maintained for backward compatibility.)
Public method AddUser(String, String, String, String) Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the AddUser method added the user specified by user name, e-mail address, display name, and notes to the role and is maintained for backward compatibility.)

Top

See also

Reference

SPRole class

SPRole members

Microsoft.SharePoint namespace