def logout():
user = User.query.filter_by(username=str(current_user.username)).first()
user.is_active = False
db.session.commit()
session.clear()
# Clear's chatBox session,
# this closes the chatBOX
hriks(
'Notification: %s Successfully Logged out' % (
current_user.username
)
)
logout_user()
# logout_user() is called which will
# Logout user
return redirect(url_for('index'))
# When ever this method is chat box will be closed
# and token for the group/user chatting will be
# dropped.
评论列表
文章目录