I try to register in my site; after a successful registration, I get redirected to the home page, but the following message is not displayed.

Thank you for applying for an account. Your account is currently pending approval by the site administrator.

In the meantime, a welcome message with further instructions has been sent to your e-mail address.

The standard core mail functionality is used, and no hook or rule is used for that registration.

Why doesn't the message appear?

I tried changing theme, but the message is still not appearing. Furthermore:

  • The $message variable is available in the template file
  • I am not using the Boost module; I am using the Mime Mail module to get HTML emails

How do i customize the message in some hooks?

  • @molot: Tried Purr Messages. Still it doesnt display anything.
    – Ram
    Commented Sep 2, 2013 at 9:26
  • @Ram seems you have exhausted my usual check-list for missing message. Sorry.
    – Mołot
    Commented Sep 2, 2013 at 12:44
  • @Mołot: I have given this one, 'Visitors, but administrator approval is required' in the account settings.Mail and everything is working fine but message alone not working. in which hooks i can add that message to be displayed in home page after registration is successful?Any suggestions ?
    – Ram
    Commented Sep 2, 2013 at 12:54
  • well, if workarounds are acceptable then yes, I do. But please edit that little note into a question itself, OK? Don't want to get downvoted for going offtopic.
    – Mołot
    Commented Sep 2, 2013 at 13:23
  • Are you redirecting to the home page in any certain special way?
    – SDMulroy
    Commented Jun 22, 2014 at 2:35

1 Answer 1


A workaround would be to manually create message in hook_user_insert, with code like:

function mymodule_user_insert(&$edit, $account, $category) {
  drupal_set_message(t('Account created, wait for approval.'), 'status');

Alternative place is hook_entity_insert:

function mymodule_entity_insert($entity, $type) {
  if ($type == 'user') {
    drupal_set_message(t('Account created, wait for approval.'), 'status');

Problem is - it is possible that the same error will hide this one too. Benefit: it's easier to experiment with small custom hook, than to debug core.

  • Still same thing, i tried 'mymodule_user_insert' but it didn't show the message after registration
    – Ram
    Commented Sep 2, 2013 at 14:00
  • 1
    @Ram well, see the last paragraph ;) But now you can test if it at least writes to watchdog.
    – Mołot
    Commented Sep 2, 2013 at 14:02
  • still no luck.No error messages too in watchdog.
    – Ram
    Commented Sep 3, 2013 at 15:10
  • @Ram If neither of these 2 hooks is ever fired for you (and that's how it looks, you can test it with die() to be sure), the problem is way deeper. It looks like some other module provides hook on the same action and somehow prevents yours (or even default) from firing. First time I hear about thing like that - I mean, I've seen conflict between 2 contrib modules, but never between contrib and core.
    – Mołot
    Commented Sep 4, 2013 at 5:57

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.