mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	fix 500: E-mail already used in user settings page
This commit is contained in:
		| @@ -453,7 +453,7 @@ func ChangeUserName(u *User, newUserName string) (err error) { | ||||
|  | ||||
| // UpdateUser updates user's information. | ||||
| func UpdateUser(u *User) error { | ||||
| 	has, err := x.Where("id!=?", u.Id).And("email=?", u.Email).Get(new(User)) | ||||
| 	has, err := x.Where("id!=?", u.Id).And("type=?", INDIVIDUAL).And("email=?", u.Email).Get(new(User)) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} else if has { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user