Finally I got the solutions from this page:
From: Disable Password Required User Account Page - #3 by Andrew
hivepress/includes/controllers/class-user.php at master · hivepress/hivepress · GitHub
Just go to line 642 and replace line 642-657 with given below codes, that I have generated using chatgpt
$form->set_values( $request->get_params() );
if ( ! $form->validate() ) {
return hp\rest_error( 400, $form->get_errors() );
}
// Check if the email field is being updated
if ( $form->get_value( 'email' ) !== $user->get_email() ) {
// Do any additional validation specific to the email field here
}
// Proceed with updating the user profile
This will disable current password required errors, especially when you are updating email field, especially for my condition in which I have no password, no current password fields.