Replace -1 with GhostUserID (#27703)
This commit is contained in:
parent
eb1478791f
commit
881806a50b
7 changed files with 18 additions and 13 deletions
|
@ -27,7 +27,7 @@ func AvatarByUserName(ctx *context.Context) {
|
|||
size := int(ctx.ParamsInt64(":size"))
|
||||
|
||||
var user *user_model.User
|
||||
if strings.ToLower(userName) != "ghost" {
|
||||
if strings.ToLower(userName) != user_model.GhostUserLowerName {
|
||||
var err error
|
||||
if user, err = user_model.GetUserByName(ctx, userName); err != nil {
|
||||
if user_model.IsErrUserNotExist(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue