Recent Topics

1 Feb 03, 2018 15:07    

Hello,

disp=user&user

How to hide personal information like phones form front-office ?

And can see only by administrators and owner ?

2 Feb 06, 2018 07:29

@nospy you can override the default _user.disp.php file in your main collection skin. Just copy the file skins_fallback_v6/_user.disp.php into your skin's folder. Open the just copied file and find a line that looks like this: foreach( $User->userfields as $userfield ) around line 355.

If you replace that block this way:

Replace:

foreach( $User->userfields as $userfield )
	{
		userfield_prepare( $userfield );

		if( $group_ID != $userfield->ufgp_ID )
		{ // Start new group
			if( $group_ID > 0 )
			{ // End previous group
				$profileForm->end_fieldset();
			}
			$profileForm->begin_fieldset( $userfield->ufgp_name, array( 'id' => 'fieldset_user_fields' ) );
		}

		$userfield_icon = '';
		if( ! empty( $userfield->ufdf_icon_name ) )
		{ // Icon
			$userfield_icon = '<span class="'.$userfield->ufdf_icon_name.' ufld_'.$userfield->ufdf_code.' ufld__textcolor"></span> ';
		}

		$profileForm->info( $userfield_icon.$userfield->ufdf_name, $userfield->uf_varchar );

		$group_ID = $userfield->ufgp_ID;
	}

with:

if ($current_User->check_perm( 'blogs', 'editall' ))
	{
		foreach( $User->userfields as $userfield )
		{
			userfield_prepare( $userfield );

			if( $group_ID != $userfield->ufgp_ID )
			{ // Start new group
				if( $group_ID > 0 )
				{ // End previous group
					$profileForm->end_fieldset();
				}
				$profileForm->begin_fieldset( $userfield->ufgp_name, array( 'id' => 'fieldset_user_fields' ) );
			}

			$userfield_icon = '';
			if( ! empty( $userfield->ufdf_icon_name ) )
			{ // Icon
				$userfield_icon = '<span class="'.$userfield->ufdf_icon_name.' ufld_'.$userfield->ufdf_code.' ufld__textcolor"></span> ';
			}

			$profileForm->info( $userfield_icon.$userfield->ufdf_name, $userfield->uf_varchar );

			$group_ID = $userfield->ufgp_ID;
		}
	}

That will hide ALL sections (but "Reputation") to the visitors and only users allowed to edit the whole site will be able to see them. If this is the idea, then the permission level and sections to hide can be adjusted, just let us know.

This post has 1 feedback awaiting moderation...


Form is loading...