1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Extend the User Profile With Custom Properties

Extend the User Profile With Custom Properties

2 posts, 1 answered
  1. Carl Anderson
    Carl Anderson avatar
    27 posts
    Registered:
    26 Jun 2012
    25 Jan 2011
    Link to this post
    Hi,

    I'd like to extend a user's profile to store extra-information such as his company name, title or phone number. I'm having trouble finding how to do so, or if it's possible or not (see here).
    Can someone point me in the right direction?

    Thanks,
    Carl
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    26 Jan 2011
    Link to this post
    Hi Carl,

    We started working on custom properties and I hope that they will be available for Q1. Currently you can work only programmatically as written in the other post.

    sample

    ProfileManager profileManager = ProfileManager.GetManager();
    var profileUser = profileManager.CreateProfile(user);
    profileManager.SaveChanges();
      
    var prof = profileManager.GetProfiles().Where(p => p.User.UserName == "newUser1").SingleOrDefault();
    var getField = prof.GetValue("somefield");
    prof.SetValue("someField", "someValue");
    profileManager.SaveChanges();


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
2 posts, 1 answered