mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: enable 2FA / password management
This commit is contained in:
@@ -301,6 +301,14 @@ func (user *User) Update(val map[string]interface{}) error {
|
||||
return DB.Model(user).Updates(val).Error
|
||||
}
|
||||
|
||||
// UpdateOptions 更新用户偏好设定
|
||||
func (user *User) UpdateOptions() error {
|
||||
if err := user.SerializeOptions(); err != nil {
|
||||
return err
|
||||
}
|
||||
return user.Update(map[string]interface{}{"options": user.Options})
|
||||
}
|
||||
|
||||
// GetGroupExpiredUsers 获取用户组过期的用户
|
||||
func GetGroupExpiredUsers() []User {
|
||||
var users []User
|
||||
|
||||
Reference in New Issue
Block a user