You are here

function activity_user_update in Activity 7

Implements hook_user_update().

File

./activity.module, line 642
Records Activity across the site and surfaces that to Views.

Code

function activity_user_update(&$edit, $account, $category) {
  entity_load('user', array(), array(), TRUE);
  $records = db_query("SELECT * FROM {activity} WHERE uid = :uid", array(
    ":uid" => $account->uid,
  ))
    ->fetchAll();

  // Recreate the messages with this new user information.
  activity_recreate_messages($records);

  // Mark all activities by this user as published / unpublished based on user
  // status.
  activity_update_status($records);
}