mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Raise 404 from Admin::UsersController#show if no user found
[Fixes #353]
This commit is contained in:
parent
6edabdfec1
commit
c4f1cb0d7b
2 changed files with 15 additions and 5 deletions
|
@ -16,6 +16,7 @@ class Admin::UsersController < Admin::AdminController
|
|||
|
||||
def show
|
||||
@user = User.where(username_lower: params[:id]).first
|
||||
raise Discourse::NotFound.new unless @user
|
||||
render_serialized(@user, AdminDetailedUserSerializer, root: false)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue