feat(plugin): Return whether to set password status at login

This commit is contained in:
LinkinStars 2023-03-10 18:01:16 +08:00
parent 19108b2124
commit 91f5f3290c
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,8 @@ type GetUserResp struct {
IsAdmin bool `json:"is_admin"`
// user status
Status string `json:"status"`
// user have password
HavePassword bool `json:"have_password"`
}
func (r *GetUserResp) GetFromUserEntity(userInfo *entity.User) {
@ -81,6 +83,7 @@ func (r *GetUserResp) GetFromUserEntity(userInfo *entity.User) {
if ok {
r.Status = statusShow
}
r.HavePassword = len(userInfo.Pass) > 0
}
type GetUserToSetShowResp struct {