@@ -136,7 +136,7 @@ func (a *AuthController) Register(c *gin.Context) {
}
userId := 0
password := utils.MD5(req.Password + utils.KEY)
- if emailItem != nil {
+ if emailItem.Id > 0 {
if emailItem.Status == 1 && emailItem.Password == "" {
//已经是正式用户,更新密码即可
emailItem.Password = password