I am looking to setup a second umbraco install that runs separately but uses the user table from another install. I am still pretty new to umbraco so I am not quite sure how to go about doing this? Thanks in advance for the help.
Currently the in-built membership providers only allow for the current website connectionstring (umbracoDbDsn) to be used, so there is no "easy quick-fix" for this. However, I believe Neils was discussing using membership and role providers, and if this does go ahead and is built using correct inheritance from the base .NET classes for membership and roles, then you'll be able to specify different connection strings for different parts of the membership and role functionality.
It was my understanding that users and members are different though. I am talking about users, not members here. Can I still use the membership providers for that?
Membership and users are different but directly related - if you check out the default ASP.NET schema that aspnet_regsql creates, you'll see how.
Membership commonly describes not only a user structure but a hierarchy. Membership is subsequently made up of user registration/management and role membership in a many-to-many relationship. A .NET "user" is also a "member", but in general this only means "site member, member of no groups or roles". The role provider handles user membership of roles and .NET role-based authorisation of resources (such as setting up groups of users with various permissions - the in-built editor, writer and translator roles in Umbraco are a great example of this), whereas the membership provider is the "umbrella" that you need to be able to implement any .NET membership scheme to begin with, and deals with all the common functionality of a basic user authentication mechanism - register, login, forgot password, password encryptions etc.
Hope this helps. Keep us posted on how you proceed with this, as I previously mentioned, similar functionality has been proposed for the core and would be a good idea IMHO.
P.S. You'll still have to either write your own membership provider that will connect to a different database or hack the existing Umbraco.providers library to allow you to specify a connectionstring per-function (roles, members etc.).
If you're talking Users as in back-office accounts I think you're going to be struggling. Although it does work with ASP.NET Membership Providers it's quite different to how standard 'membership' is often though of.
Although it should work in theory I don't know if it's ever been tried (swapping out the User provider with a custom implementation).
The way I'd go about it depends on whether you want the users synced between to two installs:
One-time sync
This is if you want the users duplicated on the first new install but going forward each has their own unique user management. To do this you just need to copy the data from the following tables:
UmbracoUser
UmbracoUseGroup
UmbracoUserType
UmbracoUser2App
UmbracoUser2Group
You can also copy the 2NodeNotify and 2NodePermission but only if you copy the umbracoNode table, otherwise the ID's wont be valid
Continuous sync
If you want the users to be always synced you need to either have a scheduled task which would query the two DB's and map up the data (on the above tables) or have triggers set up to catch the insert and copy the data across. The former works if the DB's are on different servers, the latter if they are on the same server.
Using User Table from Another Umbraco Install
I am looking to setup a second umbraco install that runs separately but uses the user table from another install. I am still pretty new to umbraco so I am not quite sure how to go about doing this? Thanks in advance for the help.
Hi Charlie,
Currently the in-built membership providers only allow for the current website connectionstring (umbracoDbDsn) to be used, so there is no "easy quick-fix" for this. However, I believe Neils was discussing using membership and role providers, and if this does go ahead and is built using correct inheritance from the base .NET classes for membership and roles, then you'll be able to specify different connection strings for different parts of the membership and role functionality.
You could always roll your own in the meantime - check out MSDN's documentation on Membership Providers to get you started.
Hope this helps,
Benjamin
It was my understanding that users and members are different though. I am talking about users, not members here. Can I still use the membership providers for that?
You can define different MembershipProviders for Users and for Members.
See web.config:
Awesome thanks. I will attempt to attack it that way.
Membership and users are different but directly related - if you check out the default ASP.NET schema that aspnet_regsql creates, you'll see how.
Membership commonly describes not only a user structure but a hierarchy. Membership is subsequently made up of user registration/management and role membership in a many-to-many relationship. A .NET "user" is also a "member", but in general this only means "site member, member of no groups or roles". The role provider handles user membership of roles and .NET role-based authorisation of resources (such as setting up groups of users with various permissions - the in-built editor, writer and translator roles in Umbraco are a great example of this), whereas the membership provider is the "umbrella" that you need to be able to implement any .NET membership scheme to begin with, and deals with all the common functionality of a basic user authentication mechanism - register, login, forgot password, password encryptions etc.
Hope this helps. Keep us posted on how you proceed with this, as I previously mentioned, similar functionality has been proposed for the core and would be a good idea IMHO.
Benjamin
P.S. You'll still have to either write your own membership provider that will connect to a different database or hack the existing Umbraco.providers library to allow you to specify a connectionstring per-function (roles, members etc.).
If you're talking Users as in back-office accounts I think you're going to be struggling. Although it does work with ASP.NET Membership Providers it's quite different to how standard 'membership' is often though of.
Although it should work in theory I don't know if it's ever been tried (swapping out the User provider with a custom implementation).
The way I'd go about it depends on whether you want the users synced between to two installs:
One-time sync
This is if you want the users duplicated on the first new install but going forward each has their own unique user management. To do this you just need to copy the data from the following tables:
You can also copy the 2NodeNotify and 2NodePermission but only if you copy the umbracoNode table, otherwise the ID's wont be valid
Continuous sync
If you want the users to be always synced you need to either have a scheduled task which would query the two DB's and map up the data (on the above tables) or have triggers set up to catch the insert and copy the data across. The former works if the DB's are on different servers, the latter if they are on the same server.
is working on a reply...