You are here

function _user_entity_diff_additional_options_status in Diff 7.3

Private callback function to render the status field.

File

includes/user.inc, line 68
Provide diff functions for the user module.

Code

function _user_entity_diff_additional_options_status($old_user, $new_user, $context) {
  $row = array(
    '#name' => t('Status'),
    '#states' => array(),
    '#weight' => -3,
    '#settings' => array(),
  );
  foreach ($context['states'] as $state) {
    $row['#states'][$state] = array(
      '#old' => array(
        $old_user->status ? t('Active') : t('Blocked'),
      ),
      '#new' => array(
        $new_user->status ? t('Active') : t('Blocked'),
      ),
    );
  }
  return $row;
}