|
|
@@ -544,7 +544,7 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR |
|
|
|
|
|
|
|
|
if err := models.UpdateUserCols(u, "language"); err != nil { |
|
|
if err := models.UpdateUserCols(u, "language"); err != nil { |
|
|
log.Error(fmt.Sprintf("Error updating user language [user: %d, locale: %s]", u.ID, u.Language)) |
|
|
log.Error(fmt.Sprintf("Error updating user language [user: %d, locale: %s]", u.ID, u.Language)) |
|
|
return setting.AppSubURL + "/" |
|
|
|
|
|
|
|
|
return setting.AppSubURL + "/dashboard" |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// Language setting of the user use the one previously set |
|
|
// Language setting of the user use the one previously set |
|
|
@@ -562,7 +562,7 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR |
|
|
u.SetLastLogin() |
|
|
u.SetLastLogin() |
|
|
if err := models.UpdateUserCols(u, "last_login_unix"); err != nil { |
|
|
if err := models.UpdateUserCols(u, "last_login_unix"); err != nil { |
|
|
ctx.ServerError("UpdateUserCols", err) |
|
|
ctx.ServerError("UpdateUserCols", err) |
|
|
return setting.AppSubURL + "/" |
|
|
|
|
|
|
|
|
return setting.AppSubURL + "/dashboard" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !util.IsExternalURL(redirectTo) { |
|
|
if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !util.IsExternalURL(redirectTo) { |
|
|
@@ -574,9 +574,9 @@ func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyR |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if obeyRedirect { |
|
|
if obeyRedirect { |
|
|
ctx.Redirect(setting.AppSubURL + "/") |
|
|
|
|
|
|
|
|
ctx.Redirect(setting.AppSubURL + "/dashboard") |
|
|
} |
|
|
} |
|
|
return setting.AppSubURL + "/" |
|
|
|
|
|
|
|
|
return setting.AppSubURL + "/dashboard" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// SignInOAuth handles the OAuth2 login buttons |
|
|
// SignInOAuth handles the OAuth2 login buttons |
|
|
|