Example #1
0
        public async Task RequestEmailChange(string newEmail)
        {
            using (var uow = UnitOfWorkProvider.Create())
            {
                using (var manager = AppUserManagerFactory())
                {
                    var user = await manager.FindByIdAsync(CurrentUser.Id.ToString());

                    var token = await manager.GenerateChangeEmailTokenAsync(user, newEmail);

                    await MailerService.SendEmailChangeConfirmationEmailAsync(newEmail, token);
                }
            }
        }