You are here

function pathauto_user_update_alias_multiple in Pathauto 7

Same name and namespace in other branches
  1. 6.2 pathauto.module \pathauto_user_update_alias_multiple()
  2. 6 pathauto.module \pathauto_user_update_alias_multiple()

Update the URL aliases for multiple user accounts.

Parameters

$uids: An array of user account IDs.

$op: Operation being performed on the accounts ('insert', 'update' or 'bulkupdate').

$options: An optional array of additional options.

1 call to pathauto_user_update_alias_multiple()
user_pathauto_bulk_update_batch_process in ./pathauto.pathauto.inc
Batch processing callback; Generate aliases for users.
1 string reference to 'pathauto_user_update_alias_multiple'
pathauto_user_operations in ./pathauto.module
Implements hook_user_operations().

File

./pathauto.module, line 1108
Main file for the Pathauto module, which automatically generates aliases for content.

Code

function pathauto_user_update_alias_multiple(array $uids, $op, array $options = array()) {
  $options += array(
    'message' => FALSE,
  );
  $accounts = user_load_multiple($uids);
  foreach ($accounts as $account) {
    pathauto_user_update_alias($account, $op, $options);
  }
  if (!empty($options['message'])) {
    drupal_set_message(format_plural(count($uids), 'Updated URL alias for 1 user account.', 'Updated URL aliases for @count user accounts.'));
  }
}