Exemple #1
0
        public async Task <ActionResult> Index(ManageAccountViewModel param = null)
        {
            var model = param ?? new ManageAccountViewModel();

            model.User = model.User ?? await _userService.FindUserById(User.Identity.GetUserId());

            if (model.User != null)
            {
                model.FacebookPic = _mediaPullService.GetFacebookProfilePic(model.User.FacebookAccessToken);
                model.TwitterPic  = _mediaPullService.GetTwitterProfilePic(model.User.TwitterAccessToken, model.User.TwitterAccessSecret);
            }

            return(View("Index", model));
        }