MCPcopy Index your code
hub / github.com/apache/answer / ConvertFromUserEntity

Method ConvertFromUserEntity

internal/schema/user_schema.go:106–115  ·  view source on GitHub ↗
(userInfo *entity.User)

Source from the content-addressed store, hash-verified

104}
105
106func (r *UserLoginResp) ConvertFromUserEntity(userInfo *entity.User) {
107 _ = copier.Copy(r, userInfo)
108 r.CreatedAt = userInfo.CreatedAt.Unix()
109 r.LastLoginDate = userInfo.LastLoginDate.Unix()
110 r.Status = constant.ConvertUserStatus(userInfo.Status, userInfo.MailStatus)
111 r.HavePassword = len(userInfo.Pass) > 0
112 if !userInfo.SuspendedUntil.IsZero() {
113 r.SuspendedUntil = userInfo.SuspendedUntil.Unix()
114 }
115}
116
117type GetCurrentLoginUserInfoResp struct {
118 *UserLoginResp

Callers 5

GetUserInfoByUserIDMethod · 0.45
EmailLoginMethod · 0.45
UserRegisterByEmailMethod · 0.45
UserVerifyEmailMethod · 0.45
UserChangeEmailVerifyMethod · 0.45

Calls 1

ConvertUserStatusFunction · 0.92

Tested by

no test coverage detected