Adding User Programatically...

From: Pai (spai_at_immunetolerance.org)
Date: 05/11/04


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



Relevant Pages

  • Re: Clumsy interface of epoll
    ... pointers, and being able to retrieve the 'value' for a given 'key' ... Since there is no way to retrieve this data based on the fd but only ... It makes no sense to do with a kernel call what can more easily be ... eg a self-contained 'close descriptor and free ...
    (comp.os.linux.development.apps)
  • RE: Adding User Programatically...
    ... > the email address is empty? ... > any tips or pointers... ... > Srikanth Pai ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Forgot password option for users (process)
    ... This is for an Enterprise solution. ... user will not have to contact helpdesk. ... Any other pointers would be great. ... >> valid info to retrieve a new password or to display the current password. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: FO3: The Pitt = Minor Spoilers
    ... Can you give me any pointers? ... You can only retrieve them after winning in the Arena. ...
    (comp.sys.ibm.pc.games.rpg)
  • Retriving the password programatically from Active Directory
    ... stored in the Active Directory? ... I was able to retrieve all the properties but not the ... but no luck... ... Srikanth Pai ...
    (microsoft.public.windows.server.scripting)

Loading