User Profiles Change Log
Microsoft Office SharePoint Server 2007 offers a change tracking object model for the user profile store to support person-based alerts and profile replication. These alerts notify you of anniversaries and many other changes in a user profile. Office SharePoint Server 2007 treats all date fields in the user profile as anniversaries. When a date in the user's profile matches the current date (based on server time), Office SharePoint Server 2007 creates a new anniversary event. Note that changes to a date field do not create an event.
The implementation of the Change Log object model is similar to, but less robust than, the Windows SharePoint Services 3.0 SPChange object. The UserProfile class defines two overloaded methods to support change tracking. These are:
public Microsoft.Office.Server.UserProfiles.UserProfileChangeCollection GetChanges(Microsoft.Office.Server.UserProfiles.UserProfileChangeQuery)
public Microsoft.Office.Server.UserProfiles.UserProfileChangeCollection GetColleagueChanges (Microsoft.Office.Server.UserProfiles.UserProfileChangeQuery)
Use the GetChanges method of the UserProfile object to return the collection of changes that have occurred in the user profile in a given time frame. An SPChange object contains information about the type of change, as represented by the ChangeType enumeration. The ChangeType value indicates the type of change, including adding, updating, deleting, or renaming changes.
UserProfileChangeQuery is an enumeration that describes the change event you are interested in. For example, it can be:
The GetColleagueChanges method works the same way but returns all the changes made by the specified colleague.
In addition to the object model, Office SharePoint Server 2007 provides a Web service to access the change log remotely. It is called the User Profiles Change Service. For more information, see How to: Use the Web Service to Modify User Profile Data