aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Contact.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/Contact.php b/include/Contact.php
index 540e1169d..0cd4be72c 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -510,7 +510,7 @@ function unmark_for_death($contact) {
}}
function random_profile() {
- $r = q("select xchan_url from xchan where 1 order by rand() limit 1");
+ $r = q("select xchan_url from xchan left join hubloc on hubloc_hash = xchan_hash where hubloc_connected > UTC_TIMESTAMP() - interval 30 day order by rand() limit 1");
if($r)
return $r[0]['xchan_url'];
return '';