Browse Source

fix #15104 (#15106)

Signed-off-by: a1012112796 <1012112796@qq.com>
tags/v1.13.6
a1012112796 4 years ago committed by GitHub
parent
commit
a6290f603f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/convert/user.go

4
modules/convert/user.go

@ -13,6 +13,10 @@ import (
// ToUser convert models.User to api.User
// signed shall only be set if requester is logged in. authed shall only be set if user is site admin or user himself
func ToUser(user *models.User, signed, authed bool) *api.User {
if user == nil {
return nil
}
result := &api.User{
ID: user.ID,
UserName: user.Name,

Loading…
Cancel
Save