Membership when more info is needed for a User

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?=

    #1

    Membership when more info is needed for a User

    I use SQL Server Membership provider and my data are also stored in SQL
    Server. But the default user fields are not enough for my users info. So I
    created another Users table apart from aspnet_Membersh ip. It has a
    PK(uniqueidenti fier) to create the reference to aspnet_Membersh ip table and
    my other info columns.
    Having read about the Custom Membership Provider in .NET help, it says that
    I should create a new object inherited from MembershipProvi der and rewrite
    all of its methods so it can be used by the membership system calls.
    The question is:
    Why not inherit from SQLMembershipPr ovider instead of MembershipProvi der?
    That way, most of the methods are already implemented and the only thing I
    would do is to override the CreateUser, UpdateUser, GetUser methods, that is,
    only a few
    .. In the 1st line of the overriden methods, I could use Mybase.CreateUs er,
    Mybase.UpdateUs er and so on, and just add the rest of the stuff I want to do
    to deal with my extra info.
    Am i in the right direction? I'd like a comment.

    TIA
    Iordanis
  • sloan

    #2
    Re: Membership when more info is needed for a User

    You should look first at the Profile to see if its enough to help you.





    If you're using SqlServer, you ~can~ inherit from
    SQLMembershipPr ovider.

    Not everyone uses sql server obviously.



    "Savvoulidi s Iordanis" <SavvoulidisIor danis@discussio ns.microsoft.co mwrote
    in message news:E4BAD51A-C1E0-40A9-B4B6-2E660C827090@mi crosoft.com...
    >I use SQL Server Membership provider and my data are also stored in SQL
    Server. But the default user fields are not enough for my users info. So I
    created another Users table apart from aspnet_Membersh ip. It has a
    PK(uniqueidenti fier) to create the reference to aspnet_Membersh ip table
    and
    my other info columns.
    Having read about the Custom Membership Provider in .NET help, it says
    that
    I should create a new object inherited from MembershipProvi der and rewrite
    all of its methods so it can be used by the membership system calls.
    The question is:
    Why not inherit from SQLMembershipPr ovider instead of MembershipProvi der?
    That way, most of the methods are already implemented and the only thing I
    would do is to override the CreateUser, UpdateUser, GetUser methods, that
    is,
    only a few
    . In the 1st line of the overriden methods, I could use Mybase.CreateUs er,
    Mybase.UpdateUs er and so on, and just add the rest of the stuff I want to
    do
    to deal with my extra info.
    Am i in the right direction? I'd like a comment.
    >
    TIA
    Iordanis

    Comment

    • =?Utf-8?B?U2F2dm91bGlkaXMgSW9yZGFuaXM=?=

      #3
      Re: Membership when more info is needed for a User

      It doesn't. Only users with specific roles need to store extra info

      Comment

      • Junior

        #4
        Re: Membership when more info is needed for a User

        The use of the MembershipProvi der is tightly integrated with Roles. You want
        to look at the Profile Table Provider ScottGu released after the Provider
        model intially released was found to be FUBAR.

        "Savvoulidi s Iordanis" <SavvoulidisIor danis@discussio ns.microsoft.co mwrote
        in message news:97BD3621-8FE3-4BD4-B8DD-A84555D06C08@mi crosoft.com...
        It doesn't. Only users with specific roles need to store extra info

        Comment

        Working...