コード例 #1
0
        public static List <AuthenticationUser> AllAuthUsers()
        {
            List <AuthenticationUser> allUsers = new List <AuthenticationUser>();

            foreach (MembershipUser mUser in Membership.GetAllUsers())
            {
                AuthenticationUser aUser = new AuthenticationUser();
                aUser.UserName       = mUser.UserName;
                aUser.MembershipUser = mUser;
                //aUser.ProviderUserKey = (Guid)mUser.ProviderUserKey;

                //Debug.WriteLine("aUser.UserName: " + aUser.UserName);

                allUsers.Add(aUser);
            }

            return(allUsers);
        }
コード例 #2
0
        public static bool DeleteMembershipUser(AuthenticationUser aUser)
        {
            // delete from the provider store
            bool           ret   = false;
            MembershipUser mUser = Membership.GetUser(aUser.UserName);

            Debug.WriteLine(mUser.UserName);

            try
            {
                Membership.DeleteUser(mUser.UserName, true);
                ret = true;
            }
            catch (Exception ex)
            {
                ClientData.Current.LogErrorAndSendAlert(ex);
                ret = false;
            }

            return(ret);
        }
コード例 #3
0
 public static void InsertMembershipUser(AuthenticationUser aUser)
 {
     // do nothing; insert the membership user from event handler on page
 }