function party_user_batch_user_sync in Party 8.2
Same name and namespace in other branches
- 7 modules/party_user/party_user.batch.inc \party_user_batch_user_sync()
@file Batch Processor for User Sync
1 string reference to 'party_user_batch_user_sync'
- party_user_sync_form_submit in modules/
party_user/ party_user.admin.inc
File
- modules/
party_user/ party_user.batch.inc, line 7 - Batch Processor for User Sync
Code
function party_user_batch_user_sync($user, $options, &$context) {
if (!isset($context['sandbox']['progress'])) {
$context['sandbox']['progress'] = 0;
$context['sandbox']['current_user'] = 0;
$context['sandbox']['max'] = db_query('SELECT COUNT(DISTINCT uid) FROM {users} WHERE uid <> 0')
->fetchField();
}
party_user_create_party_for_user($user['uid'], $options);
$context['results'][] = check_plain($user['name']);
$context['sandbox']['progress']++;
$context['sandbox']['current_user'] = $user['uid'];
$context['message'] = t('Now processing %user', array(
'%user' => $user['name'],
));
$context['finished'] = 1;
}