Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ibrahim Ahmed Badr 4 posts 24 karma points
    Dec 08, 2021 @ 12:39
    Ibrahim Ahmed Badr
    0

    Where Does Phone Number's been stored ( UmbracoIdentity )

    I'm Trying To retrieve Phone Number after user Register but it returns Null I tried to check database to see its field but I found no column refers to Phone Number and there's no property for phone number in umbracoMember Document Type

         public async Task<UserInfoViewModel> GetUserInfoAsync(IPrincipal user)
         {
             var member = await UserManager.FindByIdAsync(user.Identity.GetUserId<int>());
             var userData = ContentQuery.Content(int.Parse(GetUserDataId(user.Identity.GetUserId<int>())))?.ToObject<UserData>();
             return new UserInfoViewModel()
                {
                    Name = member.Name,
                    Email = member.Email,
                    PhoneNumber = member.PhoneNumber,
                    Address = userData.Address,
                    City = userData.City,
                    ResidenceNumber = userData.ResidenceNumber,
                    ProfilePicture = userData.ProfilePicture
                };
            }
    

    This Method returns

    {
    
          "Name": "Ibrahim Ahmed Badr",
    
           "Email": "[email protected]",
    
           "ResidenceNumber": 12100479,
    

    "PhoneNumber": null,

          "City": "Cairo",
    
           "Address": "Al-Seha street Ain Shams",
    
           "ProfilePicture": null
    }
    

    hope someone can help

Please Sign in or register to post replies

Write your reply to:

Draft