Adding User Programatically...
From: Pai (spai_at_immunetolerance.org)
Date: 05/11/04
- Next message: MJB: "Search and indexing error"
- Previous message: Ian Morrish: "Re: Can I do this with a SharePoint list?"
- Messages sorted by: [ date ] [ thread ]
Date: 10 May 2004 17:50:35 -0700
Hello there,
I have been trying to add users to a site programatically.
The following code adds user to the site but when I retrieve the user
the email address is empty?
SPSite my_site_add_user = new
SPSite("http://test/sites/test/default.aspx") ;
SPWebCollection my_webs = my_site_add_user.AllWebs;
foreach(SPWeb my_web in my_webs)
{
my_web.AllowUnsafeUpdates=true;
SPRole role = my_web.Roles[DropDownListReviewerType.SelectedItem.Text];
role.AddUser(strUserName, strContactEmail, strName, strContactNotes);
}
any idea???
any tips or pointers...
Thnaks,
Srikanth Pai
- Next message: MJB: "Search and indexing error"
- Previous message: Ian Morrish: "Re: Can I do this with a SharePoint list?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading