comparison MoinMoin/userprefs/changepass.py @ 4336:4f3d0b92d1c9

add i18n to the password checker result messages, add request param
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 25 Sep 2008 18:31:24 +0200
parents 7bfd4232cfb7
children eda647742453 a2128aa8b830
comparison
equal deleted inserted replaced
4132:99ed52b53e4e 4336:4f3d0b92d1c9
52 if not password: 52 if not password:
53 return 'error', _("Please specify a password!") 53 return 'error', _("Please specify a password!")
54 54
55 pw_checker = request.cfg.password_checker 55 pw_checker = request.cfg.password_checker
56 if pw_checker: 56 if pw_checker:
57 pw_error = pw_checker(request.user.name, password) 57 pw_error = pw_checker(request, request.user.name, password)
58 if pw_error: 58 if pw_error:
59 return 'error', _("Password not acceptable: %s") % pw_error 59 return 'error', _("Password not acceptable: %s") % pw_error
60 60
61 try: 61 try:
62 self.request.user.enc_password = user.encodePassword(password) 62 self.request.user.enc_password = user.encodePassword(password)