BLL.Group.GroupCountUser C# (CSharp) Method

GroupCountUser() public static method

public static GroupCountUser ( int userId ) : string
userId int
return string
        public static string GroupCountUser(int userId)
        {
            if (BLL.User.GetUser(userId).Membership == "Administrator")
                return TotalCount();

            var userManagedGroups = BLL.UserGroupManagement.Get(userId);

            //If count is zero image management is not being used return total count
            return userManagedGroups.Count == 0 ? TotalCount() : userManagedGroups.Count.ToString();
        }