Display register form to logged in users I am on Drupal 7. When users log into a Drupal website, they aren't allowed to see the register form anymore. That is the regular behavior and I understand the reason why Drupal behaves like that.

But I have a specific situation in my website. I need users in a specific role to register new users. I will create an invisible field in my form that will tie these new users with the UserId of the "parent" user creating them. Maybe I will use the User Reference module. There is no problem here, I can do that.

The question is: how can I get the register form to be displayed to logged in users in a specific Role without giving them the "Administer users" rights? I don't trust these guys to give them that much access.

Thank you!
The access check is made in the user_register_form() function itself:

$admin = user_access('administer users');

...

// If we aren't admin but already logged on, go to the user page instead.
if (!$admin &amp;&amp; $user-&gt;uid) {
  drupal_goto('user/' . $user-&gt;uid);
}


As you can see the check for the administer users permission is hard-coded. That said, I think you've got 2 options:


Grant the appropriate permission to that user role (obviously undesirable as you've mentioned).
Re-implement the user registration form in a custom module, changing the access check to a more appropriate one for your situation. You should be able to use pretty much all of the code from user_register_form() and piggyback off the validation/submit handlers, so there shouldn't be much coding involved at all really.