function account_sync_send_update in Account Sync 6
Same name and namespace in other branches
- 7.2 account_sync.sender.inc \account_sync_send_update()
@file Handler inc for sending account data to other sites
1 call to account_sync_send_update()
- account_sync_user in ./
account_sync.module - Implementation of hook_user().
File
- ./
account_sync.sender.inc, line 9 - Handler inc for sending account data to other sites
Code
function account_sync_send_update($op, &$edit, $account, $category = NULL) {
global $_account_sync_;
static $original_username;
// Ensure syncing is enabled and check the account_sync flag (no recursion)
if (!variable_get('account_sync_enabled', FALSE) || $_account_sync_) {
return;
}
// Only supports basic profile information right now
if ($op == 'after_update' || $op == 'insert') {
_account_sync_send_update($edit, $account, $category, $original_username);
}
elseif ($op == 'update') {
// Save the original username so that if it's changed it can still be
// matched on the syncing sites.
$original_username = $account->name;
}
}