mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-11 04:11:18 +01:00
Fix SSPI user creation (#28948)
Fixes #28945 Setting the avatar is wrong and creating a random password is equal to leave it empty.
This commit is contained in:
parent
01acd1eea3
commit
fc1bae00a4
1 changed files with 3 additions and 7 deletions
|
@ -11,7 +11,6 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models/auth"
|
"code.gitea.io/gitea/models/auth"
|
||||||
"code.gitea.io/gitea/models/avatars"
|
|
||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
user_model "code.gitea.io/gitea/models/user"
|
user_model "code.gitea.io/gitea/models/user"
|
||||||
"code.gitea.io/gitea/modules/base"
|
"code.gitea.io/gitea/modules/base"
|
||||||
|
@ -169,10 +168,7 @@ func (s *SSPI) newUser(ctx context.Context, username string, cfg *sspi.Source) (
|
||||||
user := &user_model.User{
|
user := &user_model.User{
|
||||||
Name: username,
|
Name: username,
|
||||||
Email: email,
|
Email: email,
|
||||||
Passwd: gouuid.New().String(),
|
|
||||||
Language: cfg.DefaultLanguage,
|
Language: cfg.DefaultLanguage,
|
||||||
UseCustomAvatar: true,
|
|
||||||
Avatar: avatars.DefaultAvatarLink(),
|
|
||||||
}
|
}
|
||||||
emailNotificationPreference := user_model.EmailNotificationsDisabled
|
emailNotificationPreference := user_model.EmailNotificationsDisabled
|
||||||
overwriteDefault := &user_model.CreateUserOverwriteOptions{
|
overwriteDefault := &user_model.CreateUserOverwriteOptions{
|
||||||
|
|
Loading…
Reference in a new issue