1

I am trying to override the text outputted on the user login block:

"A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail."

I have copied "/modules/user/user.module" to my site's theme folder and overwritten the text in question however I'm not seeing the change.

Any help greatly appreciated :)

Thank you,

Andrew

  • I think you new to drupal. Are you looking for change email text or get password on mail or subscription? – vgoradiya Aug 11 '15 at 10:34
2

If it's just this one string you want to change have a look at the String overrides section in settings.php:

To override specific strings on your site with or without enabling the Locale module, add an entry to this list. This functionality allows you to change a small number of your site's default English language interface strings.

The string you'll need to replace is 'A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'

2

You can use hook_form_alter to change this text

function mymodule_form_alter(&$form, &$form_state, $form_id) {
  switch ($form_id) {
    case 'user_profile_form':
    case 'user_register_form':
      $form['account']['mail']['#description'] = t('My text');
      break;
   }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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