Benutzer:MovGP0/70-489/Profiles

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
   MovGP0        Über mich        Hilfen        Artikel        Weblinks        Literatur        Zitate        Notizen        Programmierung        MSCert        Physik      


Implement Implement User Profiles and Customize Social Workload

[Bearbeiten | Quelltext bearbeiten]

Manage User Profile Properties

[Bearbeiten | Quelltext bearbeiten]

Create and Update User Profile Properties

[Bearbeiten | Quelltext bearbeiten]
  • Requires SSOM:
    • Create User Profile
    • Delete User Profile
    • Create User Profile Property
    • Delete User Profile Property
SSOM Namespaces
Microsoft.Office.Server.UserProfiles
Important Classes
Class Description
ProfilePropertyManager manages type property schemas in the user profile database, which are composed from core properties (ie. PostalAddress, FullName, etc.)
CorePropertyManager manages core properties that compose a user property (ie. Street, HouseNumber, PostalCode, City, FirstName, LastName, MiddleName, etc.)
Example
using(var site = new SPSite("http://server/site"))
{
   var serviceContext = SPServiceContext.GetContext(site);
   var profilePropertyManager = new UserProfileConfigManager(serviceContxt).ProfilePropertyManager;
   var corePropertyManager = profilePropertyManager.GetCoreProperties();

   // create a new core property
   var coreProperty = corePropertyManger.Create(false);
   coreProperty.Name = "MyProperty";
   coreProperty.DisplayName = "My Property";
   coreProperty.Description = "This is a custom property.";
   coreProperty.Type = PropertyDataType.String;
   coreProperty.Length = 100;
   corePropertyManager.Add(coreProperty);

   // create a new type property
   var typePropertyManager = ProfilePropertyManager.GetProfileTypeProperties(ProfileType.User);
   var typeProperty = typePropertyManager.Create(coreProperty);
   typeProperty.IsVisibleOnViewer = true;
   typePropertyManager.Add(typeProperty);

   // create a new subtype property
   var profileSubtypeManager = ProfileSubtypeManager.Get(sericeContext);
   var profileSubtype = profileSubtypeManager.GetProfileSubtype(ProfileSubtypeManager.GetDefaultProfileName(ProfileType.User));
   var profileSubtypePropertyManager = profilePropertyManager.GetProfileSubtypeProperties(profileSubtype.Name);
   var profileSubtypeProperty = subtypePropertyManager.Create(typeProperty);

   profileSubtypeProperty.IsUserEditable = false;
   profileSubtypeProperty.DefaultPrivacy = Privacy.Public;
   profileSubtypeProperty.UserOverridePrivacy = true;
   profileSubtypePropertyManager.Add(profileSubtypeProperty);
}

Update Privacy Filters

[Bearbeiten | Quelltext bearbeiten]

Map Properties to External Data

[Bearbeiten | Quelltext bearbeiten]

Use Managed Metadata Term Sets

[Bearbeiten | Quelltext bearbeiten]

Update Profile Picture

[Bearbeiten | Quelltext bearbeiten]

Use CSOM to follow documents, people and sites

[Bearbeiten | Quelltext bearbeiten]

Manage Like, Reply, Mention, Tag, Link, and Add Pictures

[Bearbeiten | Quelltext bearbeiten]

Access User Profile Data

[Bearbeiten | Quelltext bearbeiten]

Use Web Services

[Bearbeiten | Quelltext bearbeiten]