1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 19:08:21 +00:00

Add custom charfiled to lower email address

This commit is contained in:
zhengxie
2013-10-14 12:06:02 +08:00
parent 27bd64af0d
commit 4cffa7eeab
14 changed files with 59 additions and 26 deletions

View File

@@ -366,7 +366,11 @@ def user_add(request):
content_type = 'application/json; charset=utf-8'
if request.method == 'POST':
form = AddUserForm(request.POST)
post_values = request.POST.copy()
post_email = request.POST.get('email', '')
post_values.update({'email': post_email.lower()})
form = AddUserForm(post_values)
if form.is_valid():
email = form.cleaned_data['email']
password = form.cleaned_data['password1']