function account_sync_send_update in Account Sync 7.2
Same name and namespace in other branches
- 6 account_sync.sender.inc \account_sync_send_update()
Send an account update to all target sites.
2 calls to account_sync_send_update()
- account_sync_user_insert in ./
account_sync.module - Implements hook_user_insert().
- account_sync_user_update in ./
account_sync.module - Implements hook_user_update().
File
- ./
account_sync.sender.inc, line 11 - Handler for sending account data to other sites
Code
function account_sync_send_update($op, &$edit, $account, $category) {
global $_account_sync_;
// Ensure syncing is enabled and check the account_sync flag (no recursion).
if (!variable_get('account_sync_enabled', FALSE) || $_account_sync_) {
return;
}
if ($op == 'update') {
// Save the original username so that if it's changed it can still be
// matched on the syncing sites.
$original_username = $account->original->name;
}
else {
$original_username = $account->name;
}
_account_sync_send_update($edit, $account, $category, $original_username);
}