I am using standard way of user registration. User enters default fields + some extra text fields, gets email, clicks link in email.
Back to website, he clicks one time login in button and enters password.
After saving password message pops up, which makes no sense.

"You have just used your one-time login link. It is no longer necessary to use this link to log in. Please change your password. The changes have been saved."

Why is message "Please change your password" here ?

1 Answer 1


You can use "String Overrides" module to achieve this. As this message sets using drupal_set_message function and this function stores these messages in session. So the best way to change this message is use of string overrides module. This module can easily replace anything that's passed through t() function. So you just need to put whole string that you want to replace with your own string.

  • Thx Manish, i wanted to skip String Overrides, but if its the only way then sure. But i still wonder why :D
    – Azz Kawa
    Commented Mar 29, 2016 at 15:44
  • Actually it is because of drupal_set_message function. This function stores messages in session variable and drupal will render those messages when your template will call. You can not change these messages as they are written drupal core, and you know it is not right way to change those messages by directly editing the core functionality so we have to use string Overrides module or we have to manually find and replace messages that we want to change. Commented Apr 7, 2016 at 9:23

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.