Jump to content
najaru

Profilo visibile solo agli amici

Recommended Posts

najaru

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

Aprire questo file:

admin\applications\members\modules_public\profile\view.php

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!

Share this post


Link to post
Share on other sites
trattore

e carino, ma toglie la possibilità di aggiungere gli utenti alla lista amici accedendo ai profili..limita quella opzione

Share this post


Link to post
Share on other sites
BomAle

è 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 ) );

Share this post


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.

Guest
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.

Loading...

×
×
  • Crea Nuovo...

Important Information

By using this site, you agree to our Terms of Use.