According to most documentation it seems that the local
part of an email adress is/can be case sensitive. While
the host part is not.
So we lowercase only the host part of the given adress.
See: http://issues.mediagoblin.org/ticket/47
if request.method == 'POST' and register_form.validate():
# TODO: Make sure the user doesn't exist already
username = unicode(request.POST['username'].lower())
- email = unicode(request.POST['email'].lower())
+ em_user, em_dom = unicode(request.POST['email']).split("@", 1)
+ em_dom = em_dom.lower()
+ email = em_user + "@" + em_dom
users_with_username = request.db.User.find(
{'username': username}).count()
users_with_email = request.db.User.find(