4.7 User Update User Properties OM

This example describes the interactions made when site member properties are updated for a particular user.

User Update User Properties OM

Figure 17: User Update User Properties OM

This scenario is initiated by a call to the object model command SPUser.Update(). For simplicity's sake, this example assumes that:

  • the code has already instantiated the site collection (SPSite) and Web (SPWeb) Objects for this session, and

  • the user to be updated is in the site collection and a member of the site (2).

The following actions happen:

  1. The WFE fetches the properties for the target site collection's user information list, a SharePoint list containing information about users and groups (2) registered in a site collection. It does this by calling the stored procedure proc_GetListMetaDataAndEventReceivers (section 3.1.5.33) using TDS.

  2. The BEDS returns two result sets, which include the list metadata (section 2.2.4.14) and event receivers for the specified user information list.

  3. If the WFE determines that the user information list has not been populated in the current SPSite object, it requests the list field information for the site collection's user information list by calling the stored procedure proc_GetListFields using TDS.

  4. The BEDS returns a single fields information result set, which includes the field information for the specified user information list.

  5. If the WFE determines that it needs to populate the list of SPFeatures, the list of child objects that inherit from the base class SPFeatureDefinition is populated by calling the configuration database stored procedure proc_getObjectsByBaseClass using TDS.

  6. The BEDS returns a single Object ID result set, which includes a list of child object identifiers for the specified base class and parent object.

  7. The WFE builds a dynamic SQL query to select existing information for the user using TDS.

  8. The BEDS returns a single result set, which includes existing data for the user.

  9. The WFE builds a transactional dynamic SQL query to update the user information in the site (2). This query is sent to the SQL server using TDS. On the SQL server the following actions occur:

    • The query begins a new SQL transaction.

    • The query attempts to update the user information using the stored procedure proc_SecUpdateUser (section 3.1.5.121).

    • The query attempts to update the user's properties in the site's user information list using the stored procedure proc_UpdateListItem (section 3.1.5.127).

    • The query rolls back the SQL transaction if the previous procedures were not successful, or it commits the transaction if they were successful.

  10. The BEDS returns a single result set, which indicates the return code status of the actions within the query.

  11. The WFE builds a dynamic SQL query to select updated information for the user using TDS.

  12. The BEDS returns a single result set, which includes the data for the user.

  13. The WFE builds a transactional dynamic SQL query to update the user information in the site (2). This query is sent to the SQL server using TDS. On the SQL server the following actions occur:

    • The query begins a new SQL transaction.

    • The query attempts to update the site collection's user list data using the stored procedure proc_UpdateListItem.

    • Then the query attempts to update the user's properties in the site collection's user information table using the stored procedure proc_UpdateUserInfoInTableFromRowUpdater (section 3.1.5.129).

    • The query rolls back the SQL transaction if the previous procedures were not successful, or it commits the transaction if they were successful.

  14. The BEDS returns a successful return code status.