aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user/auth_openid.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/auth_openid.go')
-rw-r--r--routers/user/auth_openid.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/user/auth_openid.go b/routers/user/auth_openid.go
index ff03e538f8..dcc3fcf0fc 100644
--- a/routers/user/auth_openid.go
+++ b/routers/user/auth_openid.go
@@ -404,7 +404,8 @@ func RegisterOpenIDPost(ctx *context.Context, cpt *captcha.Captcha, form auth.Si
if models.CountUsers() == 1 {
u.IsAdmin = true
u.IsActive = true
- if err := models.UpdateUser(u); err != nil {
+ u.SetLastLogin()
+ if err := models.UpdateUserCols(u, "is_admin", "is_active", "last_login_unix"); err != nil {
ctx.Handle(500, "UpdateUser", err)
return
}