AddUser(String, String, String, String, Microsoft.SharePoint.Portal.Security.PortalRight) Method
The AddUser method of the PermissionCollection class adds a user with the specified rights to an area or portal site. This method also adds a Permission object to the collection of permissions for the list or site.
Parameters
Login A string that contains the user's login name.
Email A string that contains the e-mail address.
Title A string that contains the title of the user.
Notes A string that contains notes for the user.
right A Microsoft.SharePoint.Portal.Security.PortalRight value that specifies the permissions.
Remarks
This method should not be called for a portal site (the root area). Root area can only allow roles, not individual users.
Example
The following example shows how to add a user to the News area.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security