You are here

function user_patterns_params in Patterns 7

Same name and namespace in other branches
  1. 7.2 patterns_components/components/user.inc \user_patterns_params()

File

patterns_components/components/user.inc, line 669

Code

function user_patterns_params($action, $form_id, &$data = NULL, &$a) {
  if ($form_id == 'user_cancel_confirm_form' && $form_id == 'user_profile_form') {
    $result = array(
      user_load($data['uid']),
    );
  }
  elseif ($form_id == 'user_admin_role_delete_confirm' || $form_id == 'user_admin_role') {
    $result = array(
      (object) $data,
    );
  }
  elseif ($form_id == 'user_admin_permissions') {
    $result = array(
      $data['rid'],
    );
  }
  return patterns_results(PATTERNS_SUCCESS, t('Execution successful'), $result);
}