aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-12-08 01:28:27 -0800
committerfriendica <info@friendica.com>2011-12-08 01:28:27 -0800
commit3da3cd686cc7fa51e2c98e98dbf8bd3a65880bdd (patch)
treee18be4db0a3c0d980c4634f9f8821671ac598a93 /mod
parent961e34f67f477d18619d7d9a4aa8856a879b679a (diff)
downloadvolse-hubzilla-3da3cd686cc7fa51e2c98e98dbf8bd3a65880bdd.tar.gz
volse-hubzilla-3da3cd686cc7fa51e2c98e98dbf8bd3a65880bdd.tar.bz2
volse-hubzilla-3da3cd686cc7fa51e2c98e98dbf8bd3a65880bdd.zip
notifications refactor
Diffstat (limited to 'mod')
-rw-r--r--mod/profile.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/mod/profile.php b/mod/profile.php
index e7cac7959..47312fdb6 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -7,9 +7,15 @@ function profile_init(&$a) {
if($a->argc > 1)
$which = $a->argv[1];
else {
- notice( t('No profile') . EOL );
- $a->error = 404;
- return;
+ $r = q("select nickname from user where blocked = 0 and account_expired = 0 and verified = 1 order by rand() limit 1");
+ if(count($r)) {
+ $which = $r[0]['nickname'];
+ }
+ else {
+ notice( t('Requested profile is not available.') . EOL );
+ $a->error = 404;
+ return;
+ }
}
$profile = 0;