示例#1
0
 internal static void DeleteUser(UserInfo userAdapter)
 {
     UserInfoDao dao = new UserInfoDao();
     UserInfo user = dao.FindByGuid(userAdapter.Guid);
     if (user != null)
     {
         using (Transaction tx = new Transaction())
         {
             dao.Delete<UserInfo>(user);
             tx.Commit();
         }
         System.Web.Security.Membership.DeleteUser(user.Username);
     }
 }
示例#2
0
        public static MembershipUserWrapper FindByUserGuid(Data.Guid userGuid)
        {
            UserInfoDao dao = new UserInfoDao();
            UserInfo user = dao.FindByGuid(userGuid);
            if (user == null)
                throw new MembershipException("The specified user guid is not valid");

            MembershipUser user2 = System.Web.Security.Membership.GetUser(user.Username);
            return new MembershipUserWrapper(user, user2);
        }