mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 06:02:18 +02:00
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:
1 parent
30c07c20e9
commit
74060bb849
18 files changed
+132
-76
No files matched your search
+6
-3
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user