More in this section

Forums / Developing with Sitefinity / Custom User Properties

Custom User Properties

6 posts, 0 answered
  1. Carl
    Carl avatar
    7 posts
    Registered:
    17 Oct 2012
    01 Mar 2013
    Link to this post

    Possibly a basic question but which table are the custom user page properties stored?

  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    01 Mar 2013 in reply to Carl
    Link to this post
    Custom profile fields?
  3. Carl
    Carl avatar
    7 posts
    Registered:
    17 Oct 2012
    04 Mar 2013 in reply to Steve
    Link to this post

    I am very new to SF and have been passed a product to which I need to create a custom login control that redirects users once logged in to a landing URL, which is a custom property on the user page settings within the admin setup, I need to figure out how to get access to this custom property.

  4. Carl
    Carl avatar
    7 posts
    Registered:
    17 Oct 2012
    04 Mar 2013 in reply to Carl
    Link to this post

    I think I have found it now in the sf_sitefinity_profile table.

  5. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    04 Mar 2013 in reply to Carl
    Link to this post

    You really don't ever want to start touching the tables directly, always use the API.

    In this case, there's a logged in event you could handle perhaps, this is in Global.asax

    protected void Application_Start(object sender, EventArgs e)
    {
        Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized);
    }
     
    protected void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e) {
        if (e.CommandName == "Bootstrapped")
        {
            EventHub.Subscribe<ILoginCompletedEvent>(new SitefinityEventHandler<ILoginCompletedEvent>(OnLogin_Completed));
        }
    }

     

    So to get a custom field from a profile you just need to use this extension: .GetValue("yourCustomField"); (make sure to do a user on Telerik.Sitefinity and Telerik.Sitefinity.Model)

    So like "var data = profile.GetValue(fieldName); "

  6. Carl
    Carl avatar
    7 posts
    Registered:
    17 Oct 2012
    04 Mar 2013 in reply to Steve
    Link to this post

    Thanks, 

    I was not going to query the dbf directly just wanted to see how the admin panel was wired up-to the database so I could work out how to get the data I need.

6 posts, 0 answered