Programmatically Kuongeza mtumiaji kwa SharePoint Group

Hawawajui mtumiaji kundi katika MOSS 2007

code zifuatazo kuongeza mtumiaji tovuti na maalum kundi.

binafsi utupu AddUser(kamba strSite,kamba webGroup)
{
SPSecurity.RunWithElevatedPrivileges(mjumbe()
{
kutumia (SPSite tovuti = SPSite mpya(STRS))
{
kutumia (SPWeb mtandao = site.OpenWeb())
{
Boolean allowUnsafeUpdate = web.AllowUnsafeUpdates;
kujaribu
{
web.AllowUnsafeUpdates = kweli;

web.SiteUsers.Add(jina login, Barua pepe, loginId, “”);
web.Groups[webGroup].AddUser(jina login, Barua pepe, loginId, “”);

}
finally
{
web.AllowUnsafeUpdates = allowUnsafeUpdate;
}
}
}
});
}

BBC

Unaweza kutumia haya HTML

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>