Exemplo n.º 1
0
        public IActionResult Details(string id)
        {
            var user      = _userService.GetById(id);
            var userRoles = _userManager.GetRolesAsync(user).Result;

            var model = new ProfileModel()
            {
                UserId          = user.Id,
                UserName        = user.UserName,
                UserRating      = user.Rating,
                Email           = user.Email,
                ProfileImageUrl = user.ProfileImageUrl,
                MemberSince     = user.MemberSince,
                IsAdmin         = userRoles.Contains("Administrador")
            };

            return(View(model));
        }