Simplify variabe nale
This commit is contained in:
parent
af03193217
commit
b90761fd2c
@ -117,7 +117,7 @@ def _reset():
|
||||
user.clear_reset_tokens()
|
||||
if request.args.get('verification') == verification_token:
|
||||
form = UpdatePassword()
|
||||
session['user_id'] = user.id
|
||||
session['user'] = user.id
|
||||
return render_template('/admin/auth/update-password.html', form=form)
|
||||
flash('The verification of your password reset request failed and the token has been invalidated. Please make a new reset password request.', 'error')
|
||||
|
||||
@ -127,7 +127,7 @@ def _reset():
|
||||
def _update_password():
|
||||
form = UpdatePassword()
|
||||
if form.validate_on_submit():
|
||||
user = session.pop('user_id')
|
||||
user = session.pop('user')
|
||||
user = User.query.filter_by(id=user).first()
|
||||
user.update(password=request.form.get('password'))
|
||||
session['remembered_username'] = user.get_username()
|
||||
|
Loading…
Reference in New Issue
Block a user