public ActionResult GenerateInvite(string email)
        {
            // Only allow admins to submit a new code
            if (MembershipAuth.IsAdmin(HttpContext.Request))
            {
                // Generate the invite code
                Random rand = new Random();
                string code = StringManipulator.CreateInviteCode(rand.Next(58, 65));

                // Get information from database to populate the invite
                string userName  = MembershipAuth.GetCurrentUser(HttpContext.Request);
                int    orgID     = db.Users.SingleOrDefault(u => u.Email == userName).OrganizationID;
                int    createdBy = db.Users.SingleOrDefault(u => u.Email == userName).Id;

                // Create new invite code
                InviteCode invite = new InviteCode
                {
                    Code           = code,
                    DateCreated    = DateTime.Now,
                    OrganizationID = orgID,
                    IsExpired      = false,
                    CreatedBy      = createdBy,
                    SentTo         = email
                };

                // Add and commit to database
                db.InviteCodes.Add(invite);
                db.SaveChanges();
            }

            // Return error screen
            return(RedirectToAction("Error", "Error", new { error = 3 }));
        }