get_results( "SELECT * FROM {$wpdb->prefix}ace_register_fields ORDER BY sortby ASC ", OBJECT ); if( isset($_POST['submit'] ) ){ $password = ( !empty($_POST['password'] ) ) ? sanitize_text_field( $_POST['password'] ) : '' ; $confirm_pass = ( !empty($_POST['confirm_password'] ) ) ? sanitize_text_field( $_POST['confirm_password'] ) : '' ; foreach ($_POST as $post_keys => $post_values) { } if( $post_keys != ''){ unset($_POST['password']); unset($_POST['confirm_password']); unset($_POST['submit']); $update_detail = Ace_User_Management_Function::sanitize($_POST ); $myNewArray = array_combine( array_map(function($key){ return $key.'_'; }, array_keys($update_detail)), $update_detail ); if(update_user_meta( $current_user->ID , 'user_extrafields' ,$myNewArray ) == TRUE){ foreach ($_POST as $key => $update_user ) { update_user_meta( $current_user->ID, $key, sanitize_text_field($update_user) ); } $success = " ".__('Successfull Update','ace-user-management'); } } else { $error['empty_field'] = __('Field empty','ace-user-management'); } if( strcmp($password, $confirm_pass ) == 0 ){ if( !empty( $password ) && !empty( $confirm_pass )){ $password = md5( $password ); $tableName = $wpdb->prefix.'users'; $update_pass = $wpdb->query("UPDATE $tableName SET user_pass = '$password' WHERE ID =$user_ID"); echo "