def register(): validate = Users.validate_user(request.form) if not validate: return redirect('/') else: new_user = Users.add_user(request.form) session["user_id"] = new_user.id session["first_name"] = new_user.first_name return redirect('/')
def registerUser(): valid = Users.validate_user(request.form) if not valid: return render_template('partials/errors.html') else: new_user=Users.add_user(request.form) session['user_id']=new_user.id session['username']=new_user.username return "success"
def register(): validation = Users.validate_user(request.form) if not validation: return redirect('/') else: new_user = Users.add_user(request.form) session["user_id"] = new_user.id return redirect('/')