public async Task <ActionResult> SetUserEmailAsync(UserEmailUpdateVm userData) { await _securityService.SetUserEmailAsync(userData); Log.Information("User {@userData} updated", userData); return(Ok()); }
public async Task SetUserEmailAsync(UserEmailUpdateVm userData) { var user = await _userManager.FindByIdAsync(userData.UserId); user.Email = userData.NewEMail; await _userManager.UpdateAsync(user); }