udf
This commit is contained in:
parent
3d7d70fd9b
commit
c26c87d25f
4
app.py
4
app.py
@ -292,16 +292,18 @@ def post_change_pwd():
|
||||
@post('/delete')
|
||||
def post_delete():
|
||||
form = request.forms.getunicode
|
||||
tools = Tools()
|
||||
|
||||
def error(msg):
|
||||
return delete_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str)
|
||||
|
||||
try:
|
||||
username = newSession().get()['username']
|
||||
if(form('username').lower() == username):
|
||||
if(tools.input_validation(form('username')) and form('username').lower() == username):
|
||||
del_user(username)
|
||||
else:
|
||||
return(error(i18n.msg[19]))
|
||||
|
||||
except Error as e:
|
||||
LOG.warning("Unsuccessful attempt to delete the account: %s" % e)
|
||||
return error(str(e))
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user