Jump to content

Profilo visibile solo agli amici


Recommended Posts

Se volete che le vostre informazioni del profilo siano visibili solo agli amici potete eseguire questa modifica:

Aprire questo file:


e cercare

//-----------------------------------------		// Check input..		//-----------------------------------------		if ( ! $member_id )		{			$this->registry->output->silentRedirect(  $this->settings['base_url'] );		}

Aggiungi sotto:

if ( !$this->memberData['g_is_supmod'] )		{			if ( $this->memberData['member_id'] != $member_id AND  !IPSMember::checkFriendStatus( $member_id ) )			{				$this->registry->output->showError('Non sei  nella lista dei miei amici, quindi non puoi visualizzare il mio  profilo.' );			}		}
Edited by Skillman_92
bisogna rivedere il codice! g_is_supermod limita ai supermod di fatto!
Link to post
Share on other sites
  • 3 years later...

è meglio intervenire svuotando l'array che si genera da:

$member	= IPSMember::load( $member_id, 'profile_portal,pfields_content,sessions,groups', 'id' );

modificando ad esempio in:

if( !$this->memberData['g_is_supmod'] ){    //l'utente loggato è amico dell'utente che si vuole visualizzare?    if($this->memberData['member_id'] != $member_id AND !IPSMember::checkFriendStatus( $member_id ))    {        $member = IPSMember::load( $member_id, 'profile_portal,sessions,groups', 'id' );    }    //l'utente loggato sta visualizzando il suo profilo?    elseif($this->memberData['member_id'] == $member_id)    {        $member = IPSMember::load( $member_id, 'profile_portal,pfields_content,sessions,groups', 'id' );    }}else{    $member = IPSMember::load( $member_id, 'profile_portal,pfields_content,sessions,groups', 'id' );}

OPPURE si può agire qui

		/* Build data */		$member = IPSMember::buildDisplayData( $member, array( 'customFields' => 1, 'cfSkinGroup' => 'profile', 'checkFormat' => 1, 'cfGetGroupData' => 1, 'signature' => 1, 'spamStatus' => 1 ) );
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. to insert a cookie message.