Esempio n. 1
0
        static ArrayList GetActiveUsers(bool External)
        {
            ArrayList users = new ArrayList();

            using (IDataReader r = User.GetListUsersBySubstring(String.Empty))
            {
                while (r.Read())
                {
                    bool IsPending = (bool)r["IsPending"];
                    if (!IsPending)
                    {
                        bool IsExternal = (bool)r["IsExternal"];
                        if (IsExternal == External)
                        {
                            IbnUser user = new IbnUser();
                            user.UserId = (int)r["UserId"];

                            if (!IsExternal)
                            {
                                user.IsAdmin = Security.IsUserInGroup(user.UserId, InternalSecureGroups.Administrator);
                            }
                            users.Add(user);
                        }
                    }
                }
            }
            return(users);
        }
Esempio n. 2
0
        static ArrayList GetActiveUsers(bool External)
        {
            ArrayList users = new ArrayList();

            using (IDataReader r = User.GetListUsersBySubstring(String.Empty))
            {
                while (r.Read())
                {
                    bool IsPending = (bool)r["IsPending"];
                    if (!IsPending)
                    {
                        bool IsExternal = (bool)r["IsExternal"];
                        if (IsExternal == External)
                        {
                            IbnUser user = new IbnUser();
                            user.UserId = (int)r["UserId"];

                            if (!IsExternal)
                                user.IsAdmin = Security.IsUserInGroup(user.UserId, InternalSecureGroups.Administrator);
                            users.Add(user);
                        }
                    }
                }
            }
            return users;
        }