mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
Fix user's UpdatedTime in other APIs
This commit is contained in:
@ -21,6 +21,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/casdoor/casdoor/idp"
|
||||
"github.com/casdoor/casdoor/util"
|
||||
"github.com/xorm-io/core"
|
||||
)
|
||||
|
||||
@ -110,6 +111,10 @@ func SetUserField(user *User, field string, value string) (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if user != nil {
|
||||
user.UpdatedTime = util.GetCurrentTime()
|
||||
}
|
||||
|
||||
_, err = ormer.Engine.ID(core.PK{user.Owner, user.Name}).Cols("hash").Update(user)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
Reference in New Issue
Block a user