So I have three types of users - admin, LA admin and users. I am trying to set it up so that admins and LA admins cannot edit the username, password and timezone for users. I am talking about the default user edit form for admins and the form ID is "user-profile-form".
I have created a custom module but this doesn't seem to be working. Any idea what I might be doing wrong?
Even the var_dump does not seem to be outputting. I have cleared the cache and verified that the module is enabled.
function profile_change_form_alter(&$form, $form_state, $form_id) {
if ($form_id === 'user-profile-form') {
// Use var_dump to dump the $form array to see the fields.
var_dump ($form);
hide($form['account']['pass']);
hide($form['account']['current_pass_required_values']);
hide($form['account']['current_pass']);
}
}