Private
Public Access
1
0

checks email for uniqueness upon change

This commit is contained in:
Sander Roosendaal
2017-11-08 13:19:25 +01:00
parent a5c34c85d1
commit 1489e9c47a
3 changed files with 48 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ from django import template
from django.db import IntegrityError, transaction
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
from django.http import (
HttpResponse, HttpResponseRedirect,
@@ -9703,7 +9704,7 @@ def rower_edit_view(request,message=""):
})
elif request.method == 'POST' and "weightcategory" in request.POST:
accountform = AccountRowerForm(request.POST)
userform = UserForm(request.POST)
userform = UserForm(request.POST,instance=request.user)
if accountform.is_valid() and userform.is_valid():
# process
cd = accountform.cleaned_data
@@ -9720,7 +9721,7 @@ def rower_edit_view(request,message=""):
if len(first_name):
u.first_name = first_name
u.last_name = last_name
if len(email):
if len(email): ## and check_email_freeforuse(u,email):
u.email = email