public ActionResult VerifyEmail(string UID, Guid?VCode) { try { if (_VerifyUser.IsVerifyValid(VCode.Value, int.Parse(UID), "VerifyEmail")) { _VerifyUser.VerifyUpdate(VCode.Value, int.Parse(UID)); _VerifyUser.VerifyUser(int.Parse(UID)); string[] UIDs = new string[] { UID }; string[] RoleIDs = new string[] { "1" }; _roleProvider.AddUsersToRoles(UIDs, RoleIDs); _uow.SaveChanges(); return(RedirectToAction("VerifyDone")); } else { return(RedirectToAction("VerifyProblem")); } } catch { return(RedirectToAction("VerifyProblem")); } }
public override void AddUsersToRoles(string[] usernames, string[] roleNames) { RoleProvider.AddUsersToRoles(usernames, roleNames); }