prevent duplicate account creation
This commit is contained in:
parent
ec28f16031
commit
217ecca744
|
@ -41,6 +41,12 @@ async def index(request):
|
|||
if form_type == 'change_password':
|
||||
result = await forms.change_password(request, user_data)
|
||||
elif form_type == 'new_email':
|
||||
if user_data:
|
||||
result = {
|
||||
'ok': False,
|
||||
'message': "You already have an email account."
|
||||
}
|
||||
return render_template('index.html', request, locals())
|
||||
result = await forms.new_email(request)
|
||||
if result['ok']:
|
||||
email = request['meta']['username'] + '@' +config.server_domain
|
||||
|
|
Loading…
Reference in New Issue
Block a user