You are here

function user_entity_diff in Diff 7.3

Implements hook_entity_diff() on behalf of the User module.

File

./diff.module, line 741
Provides functionality to show a diff between two node revisions.

Code

function user_entity_diff($old_user, $new_user, $context) {
  $result = array();
  if ($context['entity_type'] == 'user') {
    module_load_include('inc', 'diff', 'includes/user');
    $options = variable_get('diff_additional_options_user', array(
      'name' => 'name',
      'mail' => 'mail',
      'status' => 'status',
    ));
    foreach (user_entity_diff_options('user') as $key => $option_label) {
      if (!empty($options[$key])) {
        $func = '_user_entity_diff_additional_options_' . $key;
        $result[$key] = $func($old_user, $new_user, $context);
      }
    }
  }
  return $result;
}