Skip to content

Commit e0fee09

Browse files
committed
Fix(Identity): Prevent duplicate welcome emails during account activation
(cherry picked from commit 1ba2399)
1 parent 1c2a50f commit e0fee09

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Smartstore.Web/Controllers/IdentityController.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@ public async Task<IActionResult> AccountActivation(string token, string email)
361361
return RedirectToRoute("Homepage");
362362
}
363363

364+
if (await _userManager.IsEmailConfirmedAsync(customer))
365+
{
366+
ViewBag.ActivationResult = T("Account.AccountActivation.Activated");
367+
return View();
368+
}
369+
364370
// Validate token & set user to active.
365371
var confirmed = await _userManager.ConfirmEmailAsync(customer, token);
366372

0 commit comments

Comments
 (0)