diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index ee1b17544..b6d51f24b 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -1391,7 +1391,7 @@ func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time, useMetrics.TotalActivateRegistUser = getMapKeyStringValue("TotalActivateRegistUser", userMetrics) useMetrics.TotalHasActivityUser = getMapKeyStringValue("TotalHasActivityUser", userMetrics) useMetrics.CurrentDayRegistUser = getMapKeyStringValue("CurrentDayRegistUser", userMetrics) - count, err = sess.Where("type=0").Count(new(User)) + count, err = sess.Where("type=0 and created_unix<=" + fmt.Sprint(end_unix)).Count(new(User)) if err != nil { log.Info("query user error. return.") } diff --git a/routers/user/auth.go b/routers/user/auth.go index d28ecdb3a..52b2a77b5 100755 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -326,7 +326,6 @@ func SignInPostCommon(ctx *context.Context, form auth.SignInForm) { return } models.SaveLoginInfoToDb(ctx.Req.Request, u) - log.Info("here333") // If this user is enrolled in 2FA, we can't sign the user in just yet. // Instead, redirect them to the 2FA authentication page. _, err = models.GetTwoFactorByUID(u.ID) @@ -338,7 +337,6 @@ func SignInPostCommon(ctx *context.Context, form auth.SignInForm) { } return } - log.Info("here444") // User needs to use 2FA, save data and redirect to 2FA page. if err := ctx.Session.Set("twofaUid", u.ID); err != nil { ctx.ServerError("UserSignIn: Unable to set twofaUid in session", err) @@ -370,7 +368,6 @@ func SignInCloudBrainPost(ctx *context.Context, form auth.SignInForm) { // SignInPost response for sign in request func SignInPost(ctx *context.Context, form auth.SignInForm) { - log.Info("here99999") ctx.Data["PageIsLogin"] = true ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login" ctx.Data["ActivityTpl"] = getActivityTpl() @@ -750,7 +747,6 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR // Register last login u.SetLastLogin() - log.Info("77777_2222") if err := models.UpdateUserCols(u, "last_login_unix"); err != nil { ctx.ServerError("UpdateUserCols", err) return setting.AppSubURL + "/dashboard" @@ -762,16 +758,13 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR ctx.RedirectToFirst(redirectToCourse) return redirectToCourse } - log.Info("77777_777") if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !util.IsExternalURL(redirectTo) { - log.Info("77777_8888") ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL, "", setting.SessionConfig.Secure, true) if obeyRedirect { ctx.RedirectToFirst(redirectTo) } return redirectTo } - log.Info("77777_99999") if obeyRedirect { ctx.Redirect(setting.AppSubURL + "/dashboard") }