BP_REST_Account_Settings_Options_Endpoint::get_general_fields()
Get Fields for the General “Login Information”.
Description
- From: ‘members/single/settings/general’
Return
(array|mixed|void)
Source
File: bp-settings/classes/class-bp-rest-account-settings-options-endpoint.php
public function get_general_fields() {
$fields = array();
if ( ! is_super_admin() ) {
$fields[] = array(
'name' => 'current_password',
'label' => __( 'Current Password <span>(required to update email or change current password)</span>', 'buddyboss' ),
'field' => 'password',
'value' => '',
'options' => array(),
'group_label' => '',
);
}
$fields[] = array(
'name' => 'account_email',
'label' => __( 'Account Email', 'buddyboss' ),
'field' => 'email',
'value' => esc_attr( bp_core_get_user_email( bp_loggedin_user_id() ) ),
'options' => array(),
'group_label' => '',
);
$fields[] = array(
'name' => 'pass1',
'label' => __( 'Add Your New Password', 'buddyboss' ),
'field' => 'password',
'value' => '',
'options' => array(),
'group_label' => '',
);
$fields[] = array(
'name' => 'pass2',
'label' => __( 'Repeat Your New Password', 'buddyboss' ),
'field' => 'password',
'value' => '',
'options' => array(),
'group_label' => '',
);
$fields = apply_filters( 'bp_rest_account_settings_general', $fields );
return $fields;
}
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.