diff --git a/tailbone/templates/change_password.mako b/tailbone/templates/change_password.mako new file mode 100644 index 00000000..e00d2a5d --- /dev/null +++ b/tailbone/templates/change_password.mako @@ -0,0 +1,15 @@ +<%inherit file="/base.mako" /> + +<%def name="title()">Change Password + +
+ ${h.form(url('change_password'))} + ${form.referrer_field()} + ${form.field_div('current_password', form.password('current_password'))} + ${form.field_div('new_password', form.password('new_password'))} + ${form.field_div('confirm_password', form.password('confirm_password'))} +
+ ${h.submit('submit', "Change Password")} +
+ ${h.end_form()} +
diff --git a/tailbone/views/auth.py b/tailbone/views/auth.py index 3e5acd1c..54f3264a 100644 --- a/tailbone/views/auth.py +++ b/tailbone/views/auth.py @@ -97,7 +97,7 @@ class CurrentPasswordCorrect(formencode.validators.FancyValidator): def _to_python(self, value, state): user = state - if not authenticate_user(user.username, value, session=Session()): + if not authenticate_user(Session, user.username, value): raise formencode.Invalid("The password is incorrect.", value, state) return value