mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	| @@ -989,7 +989,7 @@ func VerifyActiveEmailCode(code, email string) *EmailAddress { | |||||||
| 		data := com.ToStr(user.ID) + email + user.LowerName + user.Passwd + user.Rands | 		data := com.ToStr(user.ID) + email + user.LowerName + user.Passwd + user.Rands | ||||||
|  |  | ||||||
| 		if base.VerifyTimeLimitCode(data, minutes, prefix) { | 		if base.VerifyTimeLimitCode(data, minutes, prefix) { | ||||||
| 			emailAddress := &EmailAddress{Email: email} | 			emailAddress := &EmailAddress{UID: user.ID, Email: email} | ||||||
| 			if has, _ := x.Get(emailAddress); has { | 			if has, _ := x.Get(emailAddress); has { | ||||||
| 				return emailAddress | 				return emailAddress | ||||||
| 			} | 			} | ||||||
|   | |||||||
| @@ -201,7 +201,7 @@ func MakeEmailPrimary(email *EmailAddress) error { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Make sure the former primary email doesn't disappear. | 	// Make sure the former primary email doesn't disappear. | ||||||
| 	formerPrimaryEmail := &EmailAddress{Email: user.Email} | 	formerPrimaryEmail := &EmailAddress{UID: user.ID, Email: user.Email} | ||||||
| 	has, err = x.Get(formerPrimaryEmail) | 	has, err = x.Get(formerPrimaryEmail) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 guillep2k
					guillep2k