phpBB API Documentation
Class

phpbb\profilefields\manager

class manager

Custom Profile Fields

Methods

__construct(auth $auth, driver_interface $db, dispatcher_interface $dispatcher, request $request, template $template, service_collection $type_collection, user $user, $fields_table, $fields_language_table, $fields_data_table)

Construct

generate_profile_fields($mode, $lang_id)

Assign editable fields to template, mode can be profile (for profile change) or register (for registration) Called by ucpprofile and ucpregister

submit_cp_field($mode, $lang_id, $cp_data, $cp_error)

Submit profile field for validation

update_profile_field_data($user_id, $cp_data)

Update profile field data directly

array generate_profile_fields_template_headlines(string $restrict_option = '')

Generate the template arrays in order to display the column names

array grab_profile_fields_data($user_ids)

Grab the user specific profile fields data

array generate_profile_fields_template_data(array $profile_row, bool $use_contact_fields = true)

Assign the user's profile fields data to the template

build_insert_sql_array($cp_data)

Build Array for user insertion into custom profile fields table

Details

at line 85
public __construct(auth $auth, driver_interface $db, dispatcher_interface $dispatcher, request $request, template $template, service_collection $type_collection, user $user, $fields_table, $fields_language_table, $fields_data_table)

Construct

Parameters

auth $auth
driver_interface $db
dispatcher_interface $dispatcher
request $request
template $template
service_collection $type_collection
user $user
$fields_table
$fields_language_table
$fields_data_table

at line 104
public generate_profile_fields($mode, $lang_id)

Assign editable fields to template, mode can be profile (for profile change) or register (for registration) Called by ucpprofile and ucpregister

Parameters

$mode
$lang_id

at line 181
public submit_cp_field($mode, $lang_id, $cp_data, $cp_error)

Submit profile field for validation

Parameters

$mode
$lang_id
$cp_data
$cp_error

at line 231
public update_profile_field_data($user_id, $cp_data)

Update profile field data directly

Parameters

$user_id
$cp_data

at line 259
public array generate_profile_fields_template_headlines(string $restrict_option = '')

Generate the template arrays in order to display the column names

Parameters

string $restrict_option Restrict the published fields to a certain profile field option

Return Value

array Returns an array with the template variables type, name and explain for the fields to display

at line 314
public array grab_profile_fields_data($user_ids)

Grab the user specific profile fields data

Parameters

$user_ids

Return Value

array Users profile fields data

at line 386
public array generate_profile_fields_template_data(array $profile_row, bool $use_contact_fields = true)

Assign the user's profile fields data to the template

Parameters

array $profile_row Array with users profile field data
bool $use_contact_fields Should we display contact fields as such? This requires special treatments (links should not be parsed in the values, and more)

Return Value

array

at line 478
public build_insert_sql_array($cp_data)

Build Array for user insertion into custom profile fields table

Parameters

$cp_data