diff --git a/models/user.go b/models/user.go index 1aa7dac27..0103a6c0b 100755 --- a/models/user.go +++ b/models/user.go @@ -188,6 +188,11 @@ type SearchOrganizationsOptions struct { All bool } +// GenerateRandomAvatar generates a random avatar for user. +func (u *User) IsBindWechat() bool { + return u.WechatOpenId != "" +} + // ColorFormat writes a colored string to identify this struct func (u *User) ColorFormat(s fmt.State) { log.ColorFprintf(s, "%d:%s",