You are here

function patterns_set_user_values in Patterns 7.2

Run a query to update the fields of the user

Parameters

string $uid User ID:

array $attributes Set of values that will be updated. All are optional.:

1 call to patterns_set_user_values()
set_user_values in patterns_components/components/user.inc
Wraps the call to drupal_form_submit for 'user_profile_form'. Gathers all the expected values from the form and prepare them for the query.

File

patterns_components/components/user.inc, line 653

Code

function patterns_set_user_values($uid, $attributes) {

  //Run a query with all the optional sent values that are set.
  $num_updated = db_update('users')
    ->fields($attributes)
    ->condition('uid', $uid, '=')
    ->execute();
}