def passwordChanged(): if request.method == 'POST': new_password = request.form['new_password'] confirm_password = request.form['confirm_password'] email = request.cookies.get('email') if new_password == confirm_password and email is not None: Users.resetPassword(request.cookies.get('email'), Users.passhashed(new_password)) return render_template('login.html')
def passwordChanged(): if request.method == 'POST': new_password = request.form['new_password'] confirm_password = request.form['confirm_password'] email = request.cookies.get('email') if new_password == confirm_password: print("They are equal") Users.resetPassword(request.cookies.get('vibe_resetUser_email'), Users.passhashed(new_password)) response = make_response(redirect(url_for('login_route'))) flash("password changed") response.set_cookie('vibe_resetUser_email', "") return response return render_template('login.html')