public QuickLogOnUserInfo GetUserInfo(IUser user)
 {
     var part = user.As<WinXinUserInfoPart>();
     if (part != null)
     {
         part.Record.Loader(
          () => _winXinUserInfoPartRecordRepository
          .Fetch(x => x.UserId == user.Id).FirstOrDefault());
         var record = part.Record.Value;
         if (record != null)
         {
             var model = new QuickLogOnUserInfo
             {
                 UniqueId = record.openid,
                 NickName = record.nickname,
                 City = record.city,
                 Country = record.country,
                 HeadimgUrl = (record.headimgurl != null && record.headimgurl.Length > 0) ?
                 (record.headimgurl.Substring(0, record.headimgurl.Length - 1) + "46") : "",
                 Province = record.province,
                 Sex = record.sex == "1" ? "男" : "女",
                 Original = record
             };
             return model;
         }
     }
     return null;
 }
 public QuickLogOn.Models.QuickLogOnUserInfo GetUserInfo(Orchard.Security.IUser user)
 {
     var part = user.As<QQUserInfoPart>();
     if (part != null)
     {
         part.Record.Loader(
          () => _repository
          .Fetch(x => x.UserId == user.Id).FirstOrDefault());
         var record = part.Record.Value;
         if (record != null)
         {
             var model = new QuickLogOnUserInfo
             {
                 UniqueId = record.openid,
                 NickName = record.nickname,
                 HeadimgUrl = record.figureurl_qq_1,
                 Sex = record.gender,
                 Original = record
             };
             return model;
         }
     }
     return null;
 }