def logout(): if current_user.has_role('gamer'): if current_user.game_trial.started: if not current_user.room.is_finished(): abort(400) else: socketio.emit("gamer_unregister", {"id": current_user.id}, namespace='/gaming_manage', room="GameTrial:{}".format(current_user.game_trial.id)) db.session.delete(current_user) db.session.commit() logout_user() for key in ('identity.name', 'identity.auth_type'): session.pop(key, None) identity_changed.send(current_app._get_current_object(), identity=AnonymousIdentity()) return redirect(request.args.get('next') or url_for('index'))
def Logout(): logout_user() return redirect(url_for("main.welcome"))
def logout(): logout_user() return redirect(url_for('index'))
def logout(): logout_user() session.pop('user', None) return redirect(url_for('landing'))
def logout(): logout_user() msg = flash('You are now logged out....', 'success') return redirect(url_for('student_login', msg=msg))
def logout(): logout_user() return redirect(url_for('login'))
def logout(): logout_user() flash("You've been logged out!", "success") return redirect(url_for('users.login'))
def logout(): logout_user() flash('Logged out successfully.') return redirect('/login')
def logout(): logout_user() return redirect('/index')