@users.route('/users/<int:user_id>')
@check_account_visibility
def public(user_id):
    infos = get_infos()
    errors = get_errors()
    user = Users.query.filter_by(id=user_id, banned=False, hidden=False).first_or_404()
    badges = get_user_badges(user_id)
    return render_template('users/public.html', user=user, account=user.account, badges=badges, Tags=Tags, infos=infos, errors=errors)
@users.route('/users/<int:user_id>')
@check_account_visibility
def public(user_id):
    infos = get_infos()
    errors = get_errors()
    user = Users.query.filter_by(id=user_id, banned=False, hidden=False).first_or_404()
    badges = get_user_badges(user_id)
    return render_template('users/public.html', user=user, account=user.account, badges=badges, Tags=Tags, infos=infos, errors=errors)