ziwen пре 1 година
родитељ
комит
90c797f925
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      controller/auth.go

+ 1 - 1
controller/auth.go

@@ -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