mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Fixes #28945 Backport #28948 Setting the avatar is wrong and creating a random password is equal to leave it empty. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
		@@ -11,7 +11,6 @@ import (
 | 
			
		||||
	"sync"
 | 
			
		||||
 | 
			
		||||
	"code.gitea.io/gitea/models/auth"
 | 
			
		||||
	"code.gitea.io/gitea/models/avatars"
 | 
			
		||||
	user_model "code.gitea.io/gitea/models/user"
 | 
			
		||||
	"code.gitea.io/gitea/modules/base"
 | 
			
		||||
	gitea_context "code.gitea.io/gitea/modules/context"
 | 
			
		||||
@@ -165,10 +164,7 @@ func (s *SSPI) newUser(ctx context.Context, username string, cfg *sspi.Source) (
 | 
			
		||||
	user := &user_model.User{
 | 
			
		||||
		Name:     username,
 | 
			
		||||
		Email:    email,
 | 
			
		||||
		Passwd:          gouuid.New().String(),
 | 
			
		||||
		Language: cfg.DefaultLanguage,
 | 
			
		||||
		UseCustomAvatar: true,
 | 
			
		||||
		Avatar:          avatars.DefaultAvatarLink(),
 | 
			
		||||
	}
 | 
			
		||||
	emailNotificationPreference := user_model.EmailNotificationsDisabled
 | 
			
		||||
	overwriteDefault := &user_model.CreateUserOverwriteOptions{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user