Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to edit bp profile data


fishbowl81
Participant

@fishbowl81

possibly,

/**************************************************************************

xprofile_admin_manage_field()

Handles the adding or editing of profile field data for a user.

**************************************************************************/

function xprofile_admin_manage_field( $group_id, $field_id = null ) {

global $message, $groups;

$field = new BP_XProfile_Field($field_id);

$field->group_id = $group_id;

if ( isset($_POST) ) {

if ( BP_XProfile_Field::admin_validate($_POST) ) {

$field->name = $_POST;

$field->desc = $_POST;

$field->is_required = $_POST;

$field->is_public= $_POST;

$field->type = $_POST;

$field->order_by = $_POST[“sort_order_$field->type”];

if ( !$field->save() ) {

$message = __(‘There was an error saving the field. Please try again’, ‘buddypress’);

$type = ‘error’;

unset($_GET);

xprofile_admin($message, $type);

} else {

$message = __(‘The field was saved successfully.’, ‘buddypress’);

$type = ‘success’;

unset($_GET);

$groups = $groups = BP_XProfile_Group::get_all();

xprofile_admin( $message, $type );

}

} else {

$field->render_admin_form($message);

}

} else {

$field->render_admin_form();

}

}

line 199, in bp-xprofile-admin.php,

not really sure what you are asking

Brad

Skip to toolbar