From 5d23e701c04a6962bf11489a3c5d0c0ef0283bc8 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Aug 2012 01:55:18 -0700 Subject: now it gets hard --- mod/profile.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index 1b5bfa40c..af8f684b3 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -9,21 +9,16 @@ function profile_init(&$a) { $blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false); - if($a->argc > 1) - $which = $a->argv[1]; + if(argc() > 1) + $which = argv(1); else { - $r = q("select nickname from user where blocked = 0 and account_expired = 0 and verified = 1 order by rand() limit 1"); - if(count($r)) { - goaway($a->get_baseurl() . '/profile/' . $r[0]['nickname']); - } - else { - logger('profile error: mod_profile ' . $a->query_string, LOGGER_DEBUG); - notice( t('Requested profile is not available.') . EOL ); - $a->error = 404; - return; - } + logger('profile error: mod_profile ' . $a->query_string, LOGGER_DEBUG); + notice( t('Requested profile is not available.') . EOL ); + $a->error = 404; + return; } + $profile = 0; if((local_user()) && ($a->argc > 2) && ($a->argv[2] === 'view')) { $which = $a->user['nickname']; -- cgit v1.2.3