/** * @param FieldTable $field * @param UserTable $user * @param string $output * @param string $reason * @param int $list_compare_types * @return mixed|null|string */ public function getField( &$field, &$user, $output, $reason, $list_compare_types ) { $return = null; if ( ( $output == 'htmledit' ) && in_array( $reason, array( 'edit', 'register' ) ) ) { $privacy = new cbprivacyPrivacyTable(); $query = 'SELECT *' . "\n FROM " . $privacy->getDbo()->NameQuote( $privacy->getTableName() ) . "\n WHERE " . $privacy->getDbo()->NameQuote( 'user_id' ) . " = " . (int) $user->get( 'id' ) . "\n AND " . $privacy->getDbo()->NameQuote( 'type' ) . " = " . $privacy->getDbo()->Quote( 'profile' ) . "\n AND ( " . $privacy->getDbo()->NameQuote( 'subtype' ) . " IS NULL OR " . $privacy->getDbo()->NameQuote( 'subtype' ) . " = " . $privacy->getDbo()->Quote( '' ) . " )"; $privacy->getDbo()->setQuery( $query, 0, 1 ); $privacy->getDbo()->loadObject( $privacy ); $value = cbprivacyClass::getPrivacyInput( $field->get( 'name' ), $privacy->get( 'rule', $field->params->get( 'cbprivacy_profile_default', '0' ) ) ); $return = $this->formatFieldValueLayout( $value, $reason, $field, $user, false ) . $this->_fieldIconsHtml( $field, $user, $output, $reason, null, 'html', $value, null, null, true, 0 ); } return $return; }