mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix login with email panic when email is not exist (#18941)
This commit is contained in:
		@@ -32,7 +32,7 @@ func UserSignIn(username, password string) (*user_model.User, *auth.Source, erro
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		if !has {
 | 
							if !has {
 | 
				
			||||||
			return nil, nil, user_model.ErrEmailAddressNotExist{
 | 
								return nil, nil, user_model.ErrEmailAddressNotExist{
 | 
				
			||||||
				Email: user.Email,
 | 
									Email: username,
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		user = &user_model.User{ID: emailAddress.UID}
 | 
							user = &user_model.User{ID: emailAddress.UID}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user