mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 16:00:25 +08:00
feat: 实现数据库备份与恢复
This commit is contained in:
@@ -102,7 +102,7 @@ func (a *LdapLogin) getOrCreateUserWithLdap(userName string, password string, co
|
||||
}
|
||||
|
||||
account, err := a.getUser(userName, cols...)
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
a.createUser(userName, userInfo.DisplayName)
|
||||
return a.getUser(userName, cols...)
|
||||
} else if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user