MovGP0        Über mich        Hilfen        Artikel        Weblinks        Literatur        Zitate        Notizen        Programmierung        MSCert        Physik      


Implement Implement User Profiles and Customize Social Workload

Bearbeiten

Manage User Profile Properties

Bearbeiten

Create and Update User Profile Properties

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

Map Properties to External Data

Bearbeiten

Use Managed Metadata Term Sets

Bearbeiten

Update Profile Picture

Bearbeiten

Manage Feeds

Bearbeiten

Use CSOM to follow documents, people and sites

Bearbeiten

Get Feeds

Bearbeiten

Create Pots

Bearbeiten

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

Bearbeiten

Access User Profile Data

Bearbeiten

Use CSOM

Bearbeiten

Use SSOM

Bearbeiten

Use REST

Bearbeiten

Use Web Services

Bearbeiten

References

Bearbeiten