Some role in my site has permission to create users but not a administrator one.
How to disable create a new user of administrator role?
Is there a module for that?

  • 1
    I haven't used it but User protect sounds like it might do the trick
    – Clive
    May 17, 2012 at 18:06
  • @abd did you find solution?
    – Umair
    Jan 14, 2019 at 12:16

1 Answer 1


You can create a module that uses a hook, something like

function remove_admin_role_choice_from_add_user_form_user_register_form_alter(&$form, &$form_state, $form_id) {
  $form['account']['roles'][3]['#access'] = FALSE;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.