public async Task <ActionResult> UserEdit(
            Guid userId,
            Guid?siteId
            )
        {
            if (userId == Guid.Empty)
            {
                return(RedirectToAction("Index"));
            }

            ViewData["ReturnUrl"] = Request.Path + Request.QueryString;
            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} - Manage User"], selectedSite.SiteName);
            }
            else
            {
                ViewData["Title"] = _sr["Manage User"];
            }



            var model = new EditUserViewModel
            {
                SiteId = selectedSite.Id
            };

            var user = await _userManager.Fetch(selectedSite.Id, userId);

            if (user != null)
            {
                model.UserId          = user.Id;
                model.Email           = user.Email;
                model.FirstName       = user.FirstName;
                model.LastName        = user.LastName;
                model.Username        = user.UserName;
                model.DisplayName     = user.DisplayName;
                model.AccountApproved = user.AccountApproved;
                model.Comment         = user.Comment;
                model.EmailConfirmed  = user.EmailConfirmed;
                model.IsLockedOut     = user.IsLockedOut;
                model.LastLoginDate   = user.LastLoginUtc;
                model.TimeZoneId      = user.TimeZoneId;
                model.WebSiteUrl      = user.WebSiteUrl;

                if (string.IsNullOrEmpty(model.TimeZoneId))
                {
                    model.TimeZoneId = await _timeZoneIdResolver.GetSiteTimeZoneId();
                }
                model.AllTimeZones = _tzHelper.GetTimeZoneList().Select(x =>
                                                                        new SelectListItem
                {
                    Text     = x,
                    Value    = x,
                    Selected = model.TimeZoneId == x
                });

                if (user.DateOfBirth > DateTime.MinValue)
                {
                    model.DateOfBirth = user.DateOfBirth;
                }

                model.UserClaims = await _userManager.GetClaimsAsync((SiteUser)user);

                model.UserRoles = await _userManager.GetRolesAsync((SiteUser)user);


                var currentCrumbAdjuster = new NavigationNodeAdjuster(Request.HttpContext)
                {
                    KeyToAdjust    = "UserEdit",
                    AdjustedText   = user.DisplayName,
                    ViewFilterName = NamedNavigationFilters.Breadcrumbs // this is default but showing here for readers of code
                };
                currentCrumbAdjuster.AddToContext();
            }

            var viewName = await _customUserInfo.GetUserEditViewName(_userManager.Site, HttpContext);

            await _customUserInfo.HandleUserEditGet(
                _userManager.Site,
                model,
                HttpContext,
                ViewData);

            return(View(viewName, model));
        }