Ejemplo n.º 1
0
        public static bool UpdateUser(IUser user)
        {
            bool result;

            if (null == user)
            {
                result = false;
            }
            else
            {
                bool flag = UserHelper.UpdateUser(user.MembershipUser);
                if (flag)
                {
                    UserFactory userFactory = UserFactory.Create(user.UserRole);
                    flag = userFactory.UpdateUser(user);
                    HiContext current = HiContext.Current;
                    if (current.User.UserId == user.UserId)
                    {
                        current.User = user;
                    }
                }
                Users.ClearUserCache(user);
                result = flag;
            }
            return(result);
        }