fixes user's auto-deletion :-)
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class UnregisterViewModel
|
||||
{
|
||||
[Required]
|
||||
public string UserId { get; set; }
|
||||
|
||||
public string ReturnUrl { get; set; }
|
||||
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ namespace Yavsc.Controllers
|
||||
[HttpGet, Authorize]
|
||||
public IActionResult Delete()
|
||||
{
|
||||
return View();
|
||||
return View(new UnregisterViewModel { UserId = User.GetUserId() });
|
||||
}
|
||||
|
||||
[HttpGet, Authorize("AdministratorOnly")]
|
||||
|
@ -8,6 +8,7 @@
|
||||
<form asp-controller="Account" asp-action="Delete" method="post" class="form-horizontal" role="form">
|
||||
|
||||
@Html.Hidden("ReturnUrl")
|
||||
@Html.Hidden("UserId")
|
||||
<input type="submit" value="@SR["Unregister"]" class="btn btn-default"/>
|
||||
</form>
|
||||
|
||||
|
Reference in New Issue
Block a user