I have created a custom user registration module for my portal, and one part of the functionality is to assign roles to users depending on certain demographic information. However, I am having a problem where after registration, when the user is directed to the home page, a certain text module does not appear for the user, even though they have permissions to view it.
I'm getting a list of roles based on the demographic information of the user, and then manually adding the user to the roles. Then I log the user in and redirect them to the home page:
If arrRoles.Count > 0 Then
For Each roleID In arrRoles
objRoleController.AddUserRole(PortalId, objSSO.UserID, roleID, New DateTime)
Next
End If
UserController.UserLogin(PortalId, objNewUser.Username, txtPassword.Text, "", PortalSettings.PortalName, "", loginStatus, False)
If loginStatus = UserLoginStatus.LOGIN_SUCCESS Then
Response.Redirect(NavigateURL(PortalSettings.HomeTabId), True)
End If
Has anyone ever had problems viewing modules that have certain permissions after registering on a DNN portal?