Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.11.1
zouap 4 years ago
parent
commit
f400dd0952
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      models/user_login_log.go

+ 4
- 0
models/user_login_log.go View File

@@ -1,8 +1,10 @@
package models

import (
"fmt"
"net/http"

"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/timeutil"
)

@@ -21,6 +23,8 @@ func SaveLoginInfoToDb(r *http.Request, u *User) {

dateRecord.uid = u.ID
dateRecord.ipAddr = getIP(r)
log.Info("uid=" + fmt.Sprint(dateRecord.uid))
log.Info("ip=" + dateRecord.ipAddr)

statictisSess.Insert(&dateRecord)
}


Loading…
Cancel
Save