0

is there a way to make this message controllable from back end which appear after user registration.

   $message = t("Thank you for registering at $site_name. Your application for an account is currently pending approval.<br/> Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.");

because it contains HTML it can't be done by string override.

4 Answers 4

0

Anything inside a t() function can be overridden, you need to paste the exact contents into String overrides in settings.php or use the String Overrides module

2
0

Use hook_user_insert in your custom module

function mymodule_user_insert(&$edit, $account, $category){
    drupal_set_message(t('Message'));
}
0

You didn't say what version of Drupal you're using; this answer pertains to 7.x =^)

go to configuration -> people -> account settings. There is a space at the bottom for customizing emails:

email editing screen

Edit -- unless you meant doing it programatically, in which case @Abdelouahed_Siyagh's answer is, of course, more appropriate

4
  • Its Drupal 7, and this message appears on the fly, its not the message sent to user email also i found it in the module logontoboggan that i use. Commented Apr 6, 2015 at 14:16
  • Ah, glad you found something that works. I haven't used logintoboggan; sounds like it may be overriding the core e-mail editing with it's own? Commented Apr 6, 2015 at 14:28
  • Sorry if there is a confusion, but i am talking about the message appear directly in the highlighted are not the mail sent to the user. Commented Apr 6, 2015 at 14:33
  • Oh, gotcha. Yes, I misunderstood initially. (I'll leave my answer here in case it helps someone else.) If you found a solution that doesn't have an answer here yet, you can write your own answer and then choose it as the accepted on, to make it easier for someone with the same problem to find it. Commented Apr 6, 2015 at 14:46
0

I figured out the reason, because the message contains variable $site_name, so should replace it the value of it in the string override module like this:

Thank you for registering at mySiteName. Your application for an account is currently pending approval.
Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.

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.