]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
Changes to make contacts delete all content from the user when a user is deleted.
[friendica.git] / mod / profile.php
index 3eb97e1572737d130e788f891e80506a1bade41c..827166f92731135c093061981eec72176c43393b 100644 (file)
@@ -9,12 +9,10 @@ function profile_init(&$a) {
        if(! x($a->page,'aside'))
                $a->page['aside'] = '';
 
-       $blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
-
        if($a->argc > 1)
                $which = $a->argv[1];
        else {
-               $r = q("select nickname from user where blocked = 0 and account_expired = 0 and verified = 1 order by rand() limit 1");
+               $r = q("select nickname from user where blocked = 0 and account_expired = 0 and account_removed = 0 and verified = 1 order by rand() limit 1");
                if(count($r)) {
                        goaway($a->get_baseurl() . '/profile/' . $r[0]['nickname']);
                }
@@ -37,6 +35,7 @@ function profile_init(&$a) {
 
        profile_load($a,$which,$profile);
 
+       $blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
        $userblock = (($a->profile['hidewall'] && (! local_user()) && (! remote_user())) ? true : false);
 
        if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
@@ -313,16 +312,6 @@ function profile_content(&$a, $update = 0) {
                $o .= get_events();
        }
 
-       if((! $update) && ($tab === 'posts')) {
-
-               // This is ugly, but we can't pass the profile_uid through the session to the ajax updater,
-               // because browser prefetching might change it on us. We have to deliver it with the page.
-
-               $o .= '<div id="live-profile"></div>' . "\r\n";
-               $o .= "<script> var profile_uid = " . $a->profile['profile_uid'] 
-                       . "; var netargs = '?f='; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
-       }
-
 
        if($is_owner) {
                $r = q("UPDATE `item` SET `unseen` = 0