Bugfix: Wrong account password for updating user
This commit is contained in:
parent
77f86f7102
commit
da4a3e41c6
@ -215,7 +215,7 @@ def _update_user(id:str):
|
|||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
if not user: return jsonify({'error': 'User does not exist.'}), 400
|
if not user: return jsonify({'error': 'User does not exist.'}), 400
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
if not user.verify_password(request.form.get('confirm_password')): return jsonify({'error': 'Invalid password for your account.'}), 401
|
if not current_user.verify_password(request.form.get('confirm_password')): return jsonify({'error': 'Invalid password for your account.'}), 401
|
||||||
success, message = user.update(
|
success, message = user.update(
|
||||||
password = request.form.get('password'),
|
password = request.form.get('password'),
|
||||||
email = request.form.get('email'),
|
email = request.form.get('email'),
|
||||||
|
Loading…
Reference in New Issue
Block a user