function account_sync_servers in Account Sync 7.2
Same name and namespace in other branches
- 6 account_sync.module \account_sync_servers()
Allow modules to hook into hook_account_sync_servers($url, $account).
It passes the server url and the given account for each server available for syncing. If any of the hooks return FALSE for a given server url or account then the account data will not be sent to that server.
1 call to account_sync_servers()
- _account_sync_send_update in ./
account_sync.sender.inc - Helper function to do the heavy lifting of the account information transfer.
2 string references to 'account_sync_servers'
- account_sync_sender_settings in ./
account_sync.admin.inc - Settings form for the sender.
- account_sync_uninstall in ./
account_sync.install - Implements hook_uninstall().
File
- ./
account_sync.module, line 112 - Contains the base module code and hooks for the account sync module.
Code
function account_sync_servers($account) {
$servers = array();
$all_servers = explode("\n", variable_get('account_sync_servers', ''));
// Strip out blank lines.
$all_servers = array_filter($all_servers);
foreach ($all_servers as $server) {
$server = trim($server);
$results = module_invoke_all('account_sync_servers', $server, $account);
if (!in_array(FALSE, $results)) {
$servers[] = $server;
}
}
return $servers;
}