I need to replace the message:
The password does not include enough variation to be secure. Try:
* Adding both upper and lowercase letters.
* Adding punctuation.

Where can I find it - which file contains this instruction?

Comments

vm’s picture

you do not alter files in drupal. you use modules like stringoverride.module or locale.module to change the strings.

vako’s picture

I tried and doesn't work. OK, is there a way to disable the message completely?

vm’s picture

simply stating something didn't work isn't helpful.

That aside, if you want to hack at core files, use a tool to search through all files finding the text strings. I don't know what operating system you are using to help guide you to a program that will help in this case. There are multiple programs that can be had that will search entire folders and files locating anything you want to locate. Using google will be of benefit.

Changing text string by hacking at core files will require you to do it every time you update or upgrade your installation and is not considered a best practice.

Seems to me it would be better to explain what didn't work and what module you tried to use so that we can learn where you are possibly having trouble so that you can accomplish the task in a better way rather than hacking at core files.

choice is yours.

vako’s picture

Thanks for the explanation.
I tried the string override module and it didn't change any of the characters in that message. The module works in other locations e.g.: I changed the Save button to Post.

String search is 'my friend' and I already tried 3 different tools and they couldn't find any of the strings in the above sentence. Tried multiple variations as well. Gives me the feeling that this sentence is being retrieved from mySQL perhaps?

The reason I want to change the message or remove it completely is that I am designing an intranet site where users may choose easy passwords and the message is giving them the wrong impression that if they don't choose a complex password, they will not be able to sign-up.

As for upgrading, I do have a change log where all customizations are written in detail, hence they will not be lost, but it will be a headache that I have to endure.

vm’s picture

Desktop\drupal-6.x-dev\modules\user\user.module]
Line 2178 :         'addLetters' => t('Adding both upper and lowercase letters.'),

I'd remove the three I was using and find one ... that works ... ;)

notice too that it is wrapped in a t() which, unless I've read incorrectly in other forum posts, allows the text to be changed by other modules into other languages and over ridden to say something completely different.

vako’s picture

Thank you very much! it worked.

I wonder why the string search didn't find user.module file.

vm’s picture

I can't say. I found it using the stringoverride.module and locale.module as well changed the text too.
There are times when I can't figure something out that I tend to inspect the connection between the keyboard and the chair ; )

vako’s picture

Best troubleshooting tip! I removed that 'connection' and viola! everything works....without me. ;)
you are smart and funny Ken! thanks!

bboldi’s picture

If you just want to get rid of this message, you can simply add this css code to your theme's style.css, so you don't need to change the drupal core files:

div.password-description
{
	display:none;
	width: 0px;
	height: 0px;
	overflow: hidden;
	border: 0px #fff solid;
}
crosendahl’s picture

If your theme has a background image (like Zen does) for an error you need to add this to the css:
background-image: none;

uomeds’s picture

Thanks Boldizsár Bednárik - worked perfectly on Acquia Marina.

Peel’s picture

If you want to completely remove the password strength notice, and don't mind hacking the drupal core, you can simply change the following line in modules\user\user.module

2164 static $complete = FALSE;

to the following:

2164 static $complete = TRUE;

This will cause the password check function to believe that it has already been run, and will skip the check.