From 3be42f049fc96b14e48b4a3754547b1d25808dc4 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Tue, 21 May 2013 19:28:35 +0200 Subject: [PATCH] Don't update the password if not needed. fixes #420 --- modoboa/userprefs/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modoboa/userprefs/views.py b/modoboa/userprefs/views.py index 907925d38..be70d1958 100644 --- a/modoboa/userprefs/views.py +++ b/modoboa/userprefs/views.py @@ -92,7 +92,7 @@ def profile(request, tplname='userprefs/profile.html'): ) if form.is_valid(): form.save() - if update_password: + if update_password and form.cleaned_data["confirmation"] != "": request.session["password"] = encrypt(form.cleaned_data["confirmation"]) return ajax_simple_response(dict( status="ok", respmsg=_("Profile updated")