aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-28 01:55:18 -0700
committerfriendica <info@friendica.com>2012-08-28 01:55:18 -0700
commit5d23e701c04a6962bf11489a3c5d0c0ef0283bc8 (patch)
tree68ef8895eba1be1143d72d9a59b7a741774ce1a5 /mod/profile.php
parentfb714f9e724115993977b7a26acdda93bf84f605 (diff)
downloadvolse-hubzilla-5d23e701c04a6962bf11489a3c5d0c0ef0283bc8.tar.gz
volse-hubzilla-5d23e701c04a6962bf11489a3c5d0c0ef0283bc8.tar.bz2
volse-hubzilla-5d23e701c04a6962bf11489a3c5d0c0ef0283bc8.zip
now it gets hard
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php19
1 files changed, 7 insertions, 12 deletions
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'];