Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Is there a personal site property or class?

  Asked By: Raymundo    Date: Aug 04    Category: Sharepoint    Views: 2084

I have the following code to get and display data about all users
that have permissions to a particular site:

private void Page_Load(object sender, System.EventArgs e)
{
SPSite siteCollection =
SPControl.GetContextSite(Context);
SPWeb site = siteCollection.AllWebs[""];
SPUserCollection users = site.Users;

try
{

foreach (SPUser user in users)
{
Response.Write("User: " +
(user.Name) + "<br />");
Response.Write("Personal
Site: " + "<br />");
Response.Write("E-Mail: " +
(user.Email ) + "<br />");
Response.Write("Login
Name: " + (user.LoginName) + "<p />");

}

}
catch (Exception excpt)
{
Response.Write(excpt.ToString());
}
}

My question is - can I call another method to get the URL of the
personal site (MySite)? This may be a simple task but it is escaping
me.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Jasper Hatfield     Answered On: Aug 04

The personal  site url  will be what is configured at
http://[servername/_layouts/1033/PersonalSites.aspx which has three options.

Personal site  Location
Select the location at which to create personal sites.
Existing personal sites will not be affected.
Location:
sites personal
Example: http://portal_site/location/personal_site/


Site Naming Format
Select the format to use to name new personal sites.
Existing personal sites will not be affected.
User name (do not resolve conflicts)
Example: http://portal_site/location/username/

User name (resolve conflicts by using domain_username)
Example: http://portal_site/location/username/ or
http://portal_site/location/domain_username/

Domain and user  name (will not have conflicts)
Example: http://portal_site/location/domain_username/

 
Didn't find what you were looking for? Find more on Is there a personal site property or class? Or get search suggestion and latest updates.




Tagged: