Forums | Mahara Community
Support
/
Changing form of password
22 September 2010, 0:05
When trying to upload usres via csv I this error for every line:
Error on line 4 of your file: The password for this user is not in correct form
Error on line 5 of your file: The password for this user is not in correct form
etc
Our institution adopted a 8 digit password made up entirely of numbers. Where would I override the setting so I can create these accounts using our password convention?
Thnaks,
Dirk
22 September 2010, 2:54
git grep 'The password for this user is not' tells us that the error is stored in the string 'uploadcsverrorinvalidpassword'
git grep 'uploadcsverrorinvalidpassword' tells us that the string is used in admin/users/uploadcsv.php
Searching for it within the file and we find that it's used when failing an is_password_valid function
is_password_valid will be provided by your auth instance - I'm guessing Internal
auth/internal/lib.php has the function is_password_valid($password)
So you could modify the Internal Auth Plugin to handle your password convention, or you could modify uploadcsv.php to ignore the errors. Neither of these would be tidy though...
Changing uploadcsv.php would have the benefit of allowing you to upload any password, but mean that users resetting their passwords have to use something which still complies with the more stringent password policy.
Andrew
25 September 2010, 19:30
Thank you Andrew.
We uncommented a couple lines in uploadcsv.php and one more file and we got what we were after. Thanks for pointing us in the right direction.