$errors = edit_user($user_ID);
if ( is_wp_error( $errors ) ) {
foreach( $errors->get_error_messages() as $message )
$errmsg = “$message”;
//exit;
}
// if there are no errors, then process the ad updates
if($errmsg == ”)
{
do_action(‘personal_options_update’);
$query = “UPDATE wp_users SET notistatus=”.$_POST[‘notistatus’].” WHERE ID=”.$user_ID;
global $wpdb;
$wpdb->query($query);
if($user_ID == 1){
$query = “UPDATE wp_users SET notimessage='”.$_POST[‘notimessage’].”‘ WHERE ID=”.$user_ID;
global $wpdb;
$wpdb->query($query);
}
$d_url = $_POST[‘dashboard_url’];
wp_redirect( get_option(“siteurl”).’?page_id=’.$post->ID.’&updated=true’ );
}
else {
$errcolor = ‘style=”background-color:#FFEBE8;border:1px solid #CC0000;”‘;
$errmsg = ‘
‘;
}
foreach($_POST as $k=>$v)
{
update_user_meta($user_ID, $k, $v);
}
}
$all_meta_for_user = get_user_meta( $current_user->ID );
$all_extra_information = unserialize($all_meta_for_user[‘maven-member-registration-fields’][0]);
$extra_data = array();
foreach($all_extra_information as $data)
{
$extra_data[$data->id] = [$data->value];
}
[/php]
‘;
}
} [/php]