You are here

function pathauto_user_update_alias_multiple in Pathauto 6.2

Same name and namespace in other branches
  1. 6 pathauto.module \pathauto_user_update_alias_multiple()
  2. 7 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 763
Main file for the Pathauto module, which automatically generates aliases for content.

Code

function pathauto_user_update_alias_multiple($uids, $op, $options = array()) {
  $options += array(
    'message' => FALSE,
  );
  foreach ($uids as $uid) {
    if ($account = user_load($uid)) {
      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.'));
  }
}