Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAuthentication Problems Child Portals using Auto LoginAuthentication Problems Child Portals using Auto Login
Previous
 
Next
New Post
8/3/2006 2:07 PM
 

I too am having this trouble.

I really wish there was a switch where you could specify whether protals have seperate membership DB's, or all one.  From my understanding there would be such an option in 4.3.3, but I haven't found it yet.  Same problem as before.

Does anyone know how to modify the source to have one global membership DB?  If so, would you mind posting it? 
I've been digging around in the code for a while now and still haven't come across a way of doing it.

Thanks in advance,

Josh

 
New Post
8/10/2006 8:51 AM
 
I'm using 4.3.4 and I am still having this problem.  I'm working on a solution and I'll post my fix as soon as I get one.
 
New Post
9/5/2006 7:40 PM
 
My solution to the problem of users not being added to children portals
Assumptions:  All users get access to all portals and all users get all auto assigned roles.
applied to new users and new portals

Complete the follwoing steps
1. Backup your database
2. add the AutoUpdateUsersToAllPortalAccess SPROC
3. Add "exec AutoUpdateUsersToAllPortalAccess" to the bottom of Adduser and AddPortalInfo SPROCs

How this works:  When a new user is created the AutoUpdateUsersToAllPortalAccess SPROC is run via the exec command.  the AutoUpdateUsersToAllPortalAccess SPROC will add all users to all portals and Roles for all portals that are not already added.

Tested:  I have a small user table, but this SPROC runs almost instantly, your performance may differ since it is using a cursor.

I hope this helps band-aid the real problem until another solution can be implemented.





/* Created by Chris Wood Portalsdirect.com */

CREATE procedure [dbo].[AutoUpdateUsersToAllPortalAccess]
as


/* Insert User Portal Values */

declare @UserID int, @PortalID int, @RowCount INT, @RoleID int
declare cur cursor fast_forward for
SELECT     Users.UserID, Portals.PortalID
FROM         Users CROSS JOIN
                      Portals
WHERE     (Users.IsSuperUser = 0)
open cur

fetch cur into @UserID, @PortalID

while @@fetch_status = 0
begin
Set @RowCount = (Select count(*) from UserPortals Where Userid = @Userid and PortalId = @portalid)
if @Rowcount = 0 -- check conditions
begin
INSERT INTO [UserPortals]
           ([UserId]
           ,[PortalId]
           ,[Authorised])
select @UserID, @PortalId,1
end

fetch cur into @UserID, @PortalID
end

close cur
deallocate cur

/* Insert AutoAssign Roles */
declare cur cursor fast_forward for
SELECT     Users.UserID, Roles.RoleID
FROM         Users CROSS JOIN
                      Roles
WHERE     (Roles.AutoAssignment = 1) AND (Users.IsSuperUser = 0)
open cur

fetch cur into @UserID, @RoleID

while @@fetch_status = 0
begin
Set @RowCount = (Select count(*) from UserRoles Where Userid = @Userid and RoleID = @RoleId)
if @Rowcount = 0 -- check conditions
begin
INSERT INTO [UserRoles]
           ([UserID]
           ,[RoleID])
select @UserId, @RoleId
end

fetch cur into @UserId, @RoleId
end

close cur
deallocate cur


 
New Post
9/22/2006 6:07 PM
 

The problem that I have is that in my environment the password isn't kept in AD (for security reasons) but the membership provider wants to use the password to verify the user.  Since this isn't needed in this environment, I have modified the code to skip the password check if the site is using the AD provider.  This fix assumes that AD entries are unique since it is ignoring the password (since they would be verified against their network credentials to get their username, this shouldn't be much of an issue).

Updated for 4.3.5:

Provider.Membership.AspNetProvider
AspNetMembershipProvider.vb

~line 777 modify CreateUser:

Public Overrides Function CreateUser(ByRef user As UserInfo) As UserCreateStatus
    Dim createStatus As UserCreateStatus
    Dim _config As Authentication.Configuration = Authentication.Configuration.GetConfig()
    Dim ProviderTypeName As String = _config.ProviderTypeName
    Dim isADSIProvider As Boolean = (ProviderTypeName.IndexOf("Authentication.ADSIProvider") >= 0)

    Try
        ' check if username exists in database for any portal
        Dim objVerifyUser As UserInfo = GetUserByUserName(Null.NullInteger, user.Username, False)
        If Not objVerifyUser Is Nothing Then
            If objVerifyUser.IsSuperUser Then
                ' the username belongs to an existing super user
                createStatus = UserCreateStatus.UserAlreadyRegistered
            Else
                ' the username exists so we should now verify the password

                If isADSIProvider Or ValidateUser(objVerifyUser.PortalID, user.Username, user.Membership.Password) Then

                    ' check if user exists for the portal specified
                    objVerifyUser = GetUserByUserName(user.PortalID, user.Username, False)
                    If Not objVerifyUser Is Nothing Then
                          .....

 
New Post
9/25/2006 3:25 PM
 
Thank you VERY!!!! much for this post. Your solution fixed my Parent/Child AD problems. I am using 3.3.5, but the code in this area is the same. You saved me hours of searching. I think this is a universal problem that needs to be addressed and the fix added to the core. Something simple that I have been pulling my hair out for a week about. Thanks again.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAuthentication Problems Child Portals using Auto LoginAuthentication Problems Child Portals using Auto Login


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out