public IActionResult Delete(int id) { if (!UserIsAdmin()) { return(Error("You need to be logged in as admin to do this.")); } User user = _accountActions.DeleteGet(id); if (user == null) { return(NotFound()); } return(View(user)); }