How can I change, or customize, the message shown to the user after registration in Drupal 7?
Further instructions have been sent to your e-mail address.
I tried the following code, but it didn't work for me.
function mymodule_message_alter(&$messages) {
switch($messages->messages['status'][0]) {
case 'Further instructions have been sent to your e-mail address.':
$messages->messages['status'][0] = t('Your reset password instructions have been sent to your e-mail address. Please check your email and follow the instructions</p>');
break;
}
// Disabling / Suppress all messages on a page and only display one Message
if(arg(0) =='your-custom-page') {
if($messages->messages['error']) {
unset($messages->messages['error']);
$messages->messages['error'][0] = t('This is my custom message to replace 10 system messages :) ');
}
}
return $messages;
}