Check that the ctx.User is not nil before checking its ID (#11424)
Check that the ctx.User is not nil before checking its ID (#11424)

Fix #11423

Signed-off-by: Andrew Thornton <6a547fdd28db89120bdd70d4af1f9ba672ccd43a@cantab.net>

Co-authored-by: techknowlogick <274271a2414b6bd0d2eb0401dd4ff6e85d7016a7@gitea.io>
go-gitea/gitea,vCaesar/gitea,vdbt/gitea,cez81/gitea,lafriks/gitea,go-gitea/gitea,sapk-fork/gitea,sapk-fork/gitea,sapk-fork/gitea,go-gitea/gitea,sapk-fork/gitea,cez81/gitea,lafriks/gitea,cez81/gitea,vdbt/gitea,lafriks/gitea,vCaesar/gitea