What is the form id used in user profile edit form? I'm trying to alter some fields in the user profile form but I'm not sure why the form_id user-form is not working.

What I'm trying to achieve is to bring back the REQUIRED status of the password field which I turned off in user register form.

//USER REGISTER FORM
function MYMODULE_form_user_register_form_alter(&amp;$form, &amp;$form_state, 
$form_id) { 
$userID = \Drupal::currentUser();
$userRole = $userID-&gt;getRoles();
if($userRole[1] == 'ROLETOCATCH'){
$form['account']['pass']['#required'] = FALSE;
$form['account']['mail']['#required'] = TRUE;
$form['account']['roles']['campaign_manager']['#default_value'] =  TRUE;
$form['account']['notify']['#default_value'] = TRUE;
}   
}

//USER FORM UPDATE
function MYMODULE_form_user_form_form_alter(&amp;$form, &amp;$form_state, 
$form_id) {
    kint('hello');
}
To override the user form (when editing user profile) you can use hook_form_alter with user_form id.  

On the following example code the current_pass is required so anyone making changes will need to enter it.  Also we assume that any administrator would not be forced to enter the password.

function MODULENAME_form_alter(&amp;$form, &amp;$form_state, $form_id) { 
  $user = \Drupal::currentUser()-&gt;getRoles();
  //admin's probably should not be forced to enter password 
  if(!in_array("administrator", $user) &amp;&amp; $form_id == 'user_form') {
    //$form['account']['pass']['#required'] = TRUE;    
    $form['account']['current_pass']['#required'] = TRUE;    
  }
}


The user register form can be overriden with either one

function MODULENAME_form_user_register_form_alter(&amp;$form, &amp;$form_state, $form_id) { 
   //
}

function MODULENAME_form_alter(&amp;$form, &amp;$form_state, $form_id) { 
  if($form_id == "user_register_form"){
    //
  }
}


The module has to be enabled and/or the cache should be rebuild for the system to see those functions