views:

63

answers:

1

How to add new users in sharepoint which tables have to use

what is the procedur for adding new users in sharepoint

thanks Narasimha

A: 

Do you mean programmatically? There is an example in this blog entry:

SPWeb web = new SPSite("Site URL").OpenWeb();
SPUserInfo[] userInfo = new SPUserInfo[1];
userInfo[0].Email = "[email protected]";
userInfo[0].LoginName = @"domain\username";
userInfo[0].Name = "username";
userInfo[0].Notes = "Test";
web.Roles["Reader"].Users.AddCollection(userInfo);

You may want to take a look at this forum thread as well: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/db46ab8f-9594-4878-9bab-a18fe3fba959/

Konamiman

related questions