From 22e0bed0bf02d18883a7a39d81b81fa4e2439b92 Mon Sep 17 00:00:00 2001 From: Ricky Zhou Date: Thu, 13 Mar 2008 10:09:12 -0400 Subject: [PATCH] Handle duplicate email on signup correctly (fixes ticket #24) --- fas/fas/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fas/fas/user.py b/fas/fas/user.py index 1bbc14b..59a6c2a 100644 --- a/fas/fas/user.py +++ b/fas/fas/user.py @@ -437,8 +437,8 @@ forward to working with you! person.password = newpass['hash'] turbogears.flash(_('Your password has been emailed to you. Please log in with it and change your password')) turbogears.redirect('/user/changepass') - except KeyError: - turbogears.flash(_("The username '%s' already Exists. Please choose a different username.") % username) + except IntegrityError: + turbogears.flash(_("An account has already been registered with that email address.")) turbogears.redirect('/user/new') return dict()