public async Task <IActionResult> Index(
            Guid?siteId,
            string query   = "",
            int sortMode   = 1, //sortMode: 0 = DisplayName asc, 1 = JoinDate desc, 2 = Last, First
            int pageNumber = 1,
            int pageSize   = -1
            )
        {
            var selectedSite = await _siteManager.GetSiteForDataOperations(siteId);

            // only server admin site can edit other sites settings
            if (selectedSite.Id != _siteManager.CurrentSite.Id)
            {
                ViewData["Title"] = string.Format(CultureInfo.CurrentUICulture, _sr["{0} - User Management"], selectedSite.SiteName);
            }
            else
            {
                ViewData["Title"] = _sr["User Management"];
            }

            var itemsPerPage = _uiOptions.DefaultPageSize_UserList;

            if (pageSize > 0)
            {
                itemsPerPage = pageSize;
            }

            var siteMembers = await _userManager.GetPage(
                selectedSite.Id,
                pageNumber,
                itemsPerPage,
                query,
                sortMode);

            var model = new UserListViewModel
            {
                SiteId     = selectedSite.Id,
                UserList   = siteMembers,
                SortMode   = sortMode,
                AlphaQuery = query,
                TimeZoneId = await _timeZoneIdResolver.GetUserTimeZoneId()
            };

            return(View(model));
        }