mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FEATURE: new site setting show_inactive_accounts
This commit is contained in:
@ -30,7 +30,7 @@ class UserBadgesController < ApplicationController
|
||||
def username
|
||||
params.permit [:grouped]
|
||||
|
||||
user = fetch_user_from_params
|
||||
user = fetch_user_from_params(include_inactive: current_user.try(:staff?) || (current_user && SiteSetting.show_inactive_accounts))
|
||||
user_badges = user.user_badges
|
||||
|
||||
if params[:grouped]
|
||||
|
Reference in New Issue
Block a user