Example #1
0
 public UserInfo GetUserInfo()
 {
     if (this.User.Identity.IsAuthenticated)
     {
         var steamId   = UserExtensions.GetSteamId(this.User);
         var steamInfo = _steamService.GetSteamInfo(steamId);
         var userName  = steamInfo.FirstOrDefault(u => u.Name == "personaname")?.Value;
         var mmr       = _trackerService.GetMmr(steamId).Result;
         return(new UserInfo {
             SteamId = steamId, DisplayName = userName, Mmr = mmr
         });
     }
     return(null);
 }