Copied to clipboard

Flag this post as spam?

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


  • RoelAlblas 50 posts 61 karma points
    Oct 14, 2009 @ 21:57
    RoelAlblas
    0

    Extend usertable, best practice

    Hi,

    I like to extend the usertable with a phonenumber. What would be the best practice?

    • separate table? How to deal with UserID's?
    • extending the table umbracoUser?
    • something else?

    I like to use the lovely User.MakeNew() function, but is this possible?

    Please let me know!

    Roel

  • Stephan Lonntorp 195 posts 212 karma points
    Oct 14, 2009 @ 22:28
    Stephan Lonntorp
    0

    Add a property to the membertype, i.e. userPhone, and use the umbraco API to get, set it, member.getProperty("userPhone").Value

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Oct 14, 2009 @ 23:16
    Morten Bock
    1

    I think Roel is talking about users, not members.

    I would not mess with the Umbraco database. It would compromise your upgrade path.

    Instead I would save the extra data in a separate table with a reference to the user in question. This ofcourse means that you cannot save your exstra data through the MakeNew() method, but you could make your own wrapper for it that saves and fetches the data.

  • RoelAlblas 50 posts 61 karma points
    Oct 15, 2009 @ 19:44
    RoelAlblas
    0

    Yes, I meant users but with the functionality of members :-) Think I should use members instead of users, didn't know of them.

    Thanks to both!

Please Sign in or register to post replies

Write your reply to:

Draft