Ejemplo n.º 1
0
    public async Task <IActionResult> OnPostChangeEmailSettingsAsync()
    {
        var user = await _userManager.GetUserAsync(User);

        if (user == null)
        {
            return(NotFound($"Unable to load user with ID '{_userManager.GetUserId(User)}'."));
        }

        await _userManager.SetEmailSettings(user, Input.SendPublicBidEmails);

        StatusMessage = "Email Settings Updated.";
        return(RedirectToPage());
    }