feat: set created time if not presented in AddUser() API (#3315)

This commit is contained in:
Cliff 2024-10-24 18:06:05 +03:00 committed by GitHub
parent 1e0b709c73
commit f7559aa040
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -816,6 +816,10 @@ func AddUser(user *User) (bool, error) {
user.UpdateUserPassword(organization)
}
if user.CreatedTime == "" {
user.CreatedTime = util.GetCurrentTime()
}
err = user.UpdateUserHash()
if err != nil {
return false, err