Fix 500 when getting user as unauthenticated user (#8653)
Fix 500 when getting user as unauthenticated user (#8653)

When doing GET /api/v1/users/{user} as an unauthenticated user,
gitea throws a 500 because it's trying to dereference elements
from the context user. It wants to do this to see whether to
show the primary email and will do that if the logged in user
is admin or the user in question. However, if ctx.User is nil,
go gets really unhappy.
cez81/gitea,typeless/gitea,cez81/gitea,go-gitea/gitea,vdbt/gitea,vCaesar/gitea,sapk-fork/gitea,typeless/gitea,vdbt/gitea,lafriks/gitea,typeless/gitea,vCaesar/gitea,lafriks/gitea,lafriks/gitea,go-gitea/gitea,typeless/gitea,sapk-fork/gitea,cez81/gitea,go-gitea/gitea,sapk-fork/gitea,sapk-fork/gitea