Copied to clipboard

Flag this post as spam?

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


  • Justin 4 posts 24 karma points
    Aug 04, 2011 @ 17:14
    Justin
    0

    Extending Umbraco, custom login / membership

    Very new to Umbraco.  I am in the feasibility phase of my project, trying to figure out if Umbraco will work in my situation.

    Current Situation: Currently, we have several web applications that use a custom user credentials class for user management.  These web applications share a common database.  We DO NOT use the ASP.NET membership. 

    Goal: The user needs to be able to log in to our Umbraco site with the same user credentials as he/she would in our web applications.  Additionally, we want to use whatever default membership management (ASP.NET Membership I believe) that comes with Umbraco.  Why?  I am also assuming Umbraco provides some sort of member site statistics.

    Question:  How can I "link" the Umbraco user to their corresponding web application user information?  A custom Membership provider?

  • Bex 444 posts 555 karma points
    Aug 05, 2011 @ 15:06
    Bex
    0

    Hi Justin

    Welcome to Umbraco!

    The forums for some reason are very quiet at the moment..!

    What you are trying to do is possible with umbraco as I have done something similar my self, except for the site statistics.
    Think of it as a standard asp.net website and create yourself a custom membership provider (and roles provider) in the same way as you would for a normal site, and override all the functions applicable to your site.

    You then just change the path in the web config to point to your new membership and roles provider and it will use them instead of the inbuilt umbraco one.

    Your can then just use all the membership controls and functions as you usually would.

    As for statistics, I don't think this is built, because as far as I am aware this is not built into the default membership provider, but that said, I have in the past created my own logging table that logs who evers logged in and when etc..

    Does this help?

    EDIT: having just re-read your question, are you talking of front end of backend users I'm not sure?

     

    Bex

  • Justin 4 posts 24 karma points
    Aug 05, 2011 @ 15:52
    Justin
    0

    Okay, so I can have a custom membership provider use the users table in our database we use for our web applications?  So, Umbraco would have its own database, but the membership provider would access/modify the users table in our other database on a seperate server.  See diagram I created: http://screencast.com/t/d4sh335G ... it doesn't show the Umbraco database, the database shown is representing our web application database.  Does this make sense?

    BTW - I am not sure what you mean by front-end / back-end users in this scenario...

  • Bex 444 posts 555 karma points
    Aug 05, 2011 @ 16:04
    Bex
    0

    Hi!

     

    When I say frontend I mean the site users, and backend the users who administer the site. I know custom membership definitely works with site users, but not tried with backend users, but pretty sure they work in a very smilar way.

    You would just install umbraco with it's own database and then create the custom membership provider that points at your users database and copy the dll into the bin dir of umbraco. (making sure you have added the path to the membership provider in the web config along with your db connection string)
    You can also set it up in such a way that you could still administer site users using the Umbraco backend but again this is not something I have done but it's possible, just a bit more work. There is something about it on the WIKI somewhere, but everything in there is a bit jumbled so quite difficult to find!

    If you have any more questions please ask.

    Bex

     

  • Justin 4 posts 24 karma points
    Aug 05, 2011 @ 16:17
    Justin
    0

    Very nice.  I am mostly concerned with the site users so this sounds like it will work!

    EDIT: Don't have enough Karma to give high five...so ... high five.

  • Bex 444 posts 555 karma points
    Aug 05, 2011 @ 16:27
    Bex
    0

    Good Luck!

    As a developer having only used Umbraco for just over a year I'm converted (and certified!)!

    In the majority of cases it will make your life so much easier (once I you've got your head round macros and xslt) :)

    A tip for you if you a debug fiend like me, I like to debug everything and I found having to attach to the process ever time just a pain in the bum! (this is the suggested way)

    So I now include the umbraco website in the solution and reference my custom project from it.
    So every time I run my solution it builds it all together and you can debug it easily. Just have to make sure you set it so that the umbraco website doesn't built (as it won't). For just dll updates it make debuging very simple.

    When you add user controls you've got to copy them over, but still you don't have to copy the dll and just press play in VS and it all works nice!

Please Sign in or register to post replies

Write your reply to:

Draft