Fix various legacy problems (#37092)

1.  Fix #36439
2. Fix #37089
3. Fix incorrect layout of admin auth oidc page
4. Fix #35866
5. Fix #35800
6. Fix #36243
This commit is contained in:
wxiaoguang
2026-04-03 20:19:04 +08:00
committed by GitHub
parent 30c07c20e9
commit 74060bb849
18 changed files with 132 additions and 76 deletions
+6 -3
View File
@@ -1323,9 +1323,12 @@ func GetUserByEmail(ctx context.Context, email string) (*User, error) {
return nil, ErrUserNotExist{Name: email}
}
// GetUser checks if a user already exists
func GetUser(ctx context.Context, user *User) (bool, error) {
return db.GetEngine(ctx).Get(user)
func GetIndividualUser(ctx context.Context, user *User) (bool, error) {
has, err := db.GetEngine(ctx).Get(user)
if has && user.Type != UserTypeIndividual {
has = false
}
return has, err
}
// GetUserByOpenID returns the user object by given OpenID if exists.