public ActionResult AcceptProfile(int id = 0) { Account account = accountDAL.FetchByID(id); if (account == null) { TempData["errorMessage"] = "Sorry. This user does not exist !"; return(RedirectToAction("AdminDashboard")); } else { account.Profile.isApproved = true; _email.SendProfileApprovedEmail(account.email, account.email); profileDAL.Update(account.Profile); TempData["successMessage"] = "Profile has been approved"; } return(RedirectToAction("AdminDashboard")); }