Here is the code, which will create MySite for the user programatically
public static void CreateMySite(string userId)
{
using (SPSite site = new SPSite("http://sharepointurl"))
{
ServerContext context = ServerContext.GetContext(site);
UserProfileManager profileManager = new UserProfileManager(context);
UserProfile userProfile = profileManager.GetUserProfile(userId);
userProfile.CreatePersonalSite();
}
}
Showing posts with label MySite. Show all posts
Showing posts with label MySite. Show all posts
Tuesday, August 25, 2009
Subscribe to:
Posts (Atom)