/** * @param FieldTable $field * @param UserTable $user * @param string $output * @param string $formatting * @param string $reason * @param int $list_compare_types * @return mixed|null|string */ public function fieldDisplay( &$field, &$user, $output, $formatting, $reason, $list_compare_types ) { $return = null; if ( ( ! $field->get( '_noPrivacy', false ) ) && ( ! Application::Cms()->getClientId() ) && ( ! cbprivacyClass::checkUserModerator() ) ) { $field->set( '_noPrivacy', true ); if ( ( $output == 'html' ) && ( $reason != 'search' ) && $field->get( 'profile' ) && ( Application::MyUser()->getUserId() != $user->get( 'id' ) ) ) { if ( ! cbprivacyClass::checkFieldDisplayAccess( $field, $user ) ) { $return = ' '; } } elseif ( ( $output == 'htmledit' ) && ( $reason != 'search' ) && $user->get( 'id' ) ) { if ( ! cbprivacyClass::checkFieldEditAccess( $field ) ) { $return = ' '; } } $field->set( '_noPrivacy', false ); } return $return; }