From 0b0bd3c20765d267ec6d7cc261c7713917a22582 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 24 Oct 2013 19:38:50 -0700 Subject: create update record for accounts on directory server itself during profile changes, re-queue failed directory sync packets, fix account_id index in queue creation, be more selective about updating hubloc_connected (only when we're talking to the associated site). But we still need a way to flag dead accounts and these mechanisms won't cut it, because it isn't a requirement that channels communicate with anybody, except for contacting the directory when the account is created. I think we need to make every channel ping the directory once a month. Then we can find those that have not done so (after syncing with other directories). We can't have the directory just flag dead accounts as this would create a way for an anti-social attacker to become a directory server and mark all the accounts dead. --- include/dir_fns.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/dir_fns.php') diff --git a/include/dir_fns.php b/include/dir_fns.php index adbcb6e3c..e234ae0fa 100644 --- a/include/dir_fns.php +++ b/include/dir_fns.php @@ -118,6 +118,7 @@ function update_directory_entry($ud) { ); } } + } @@ -128,7 +129,7 @@ function syncdirs($uid) { logger('syncdirs', LOGGER_DEBUG); - $p = q("select channel.channel_hash, channel_timezone, profile.* from profile left join channel on channel_id = uid where uid = %d and is_default = 1", + $p = q("select channel.channel_hash, channel_address, channel_timezone, profile.* from profile left join channel on channel_id = uid where uid = %d and is_default = 1", intval($uid) ); @@ -199,6 +200,8 @@ function syncdirs($uid) { } } - // TODO send refresh zots to downstream directory servers + $ud_hash = random_string(); + update_modtime($ud_hash,$hash,$p[0]['channel_address'] . '@' . get_app()->get_hostname(),1); + } -- cgit v1.2.3