You are here

function fasttoggle_user_save in Fasttoggle 7

Save the user object.

Parameters

array $options: The array of options.

string $group: The setting group string.

string $instance: The setting instance string.

string $new_value: The new value to apply.

object $object: The user object.

1 string reference to 'fasttoggle_user_save'
fasttoggle_user_fasttoggle_available_links in module/fasttoggle_user/fasttoggle_user.module
Implements hook_fasttoggle_available_links().

File

module/fasttoggle_user/fasttoggle_user.module, line 198

Code

function fasttoggle_user_save(array $options, $group, $instance, $new_value, $object) {
  $edit = array();
  if ($group == 'role') {
    $edit['roles'] = $new_value;
  }
  else {
    $edit[$instance] = $new_value;
  }
  user_save($object, $edit);
}