Revert PR checking for GetUser returning nil,nil (#20508)

Reverts the PR https://github.com/mattermost/mattermost-server/pull/20501 which was added for SET escalation.

It was determined that the plugins call to GetUser never made it to the app layer.
Этот коммит содержится в:
Doug Lauder
2022-06-20 12:39:45 -04:00
коммит произвёл GitHub
родитель 076454b4f3
Коммит f1ddd3ad38

Просмотреть файл

@@ -388,12 +388,6 @@ func (a *App) GetUser(userID string) (*model.User, *model.AppError) {
}
}
// Temporary check to diagnose a SET escalation; when GetUser is called by some plugins a nil,nil is returned.
if user == nil {
mlog.Error("Unexpected nil from GetUser", mlog.String("user_id", userID))
return nil, model.NewAppError("GetUser", "app.user.get.app_error", nil, "Unexpected nil fetching userid "+userID, http.StatusInternalServerError)
}
return user, nil
}