Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Chat About It!  Redirect after Logout no longer works in 4.8.2
Previous Previous
 
Next Next
New Post 5/22/2008 8:25 AM
User is offline rwtrader
1 posts
10th Ranked


Re: Redirect after Logout no longer works in 4.8.2 

Ok, I'll ask the obvious question.  When will it be fixed?  This is a pretty important function.

 
New Post 5/22/2008 8:55 AM
User is offline Matt Olson
7 posts
10th Ranked


Re: Redirect after Logout no longer works in 4.8.2 

Is someone submitting a bug report on this?  I have another issue that is related to this.  The logoff page does not redirect you to the home page properly because the logic in the following code in the AuthenticationController.vb file has some logic issues.  The issue is that if I login, then go to say an About Us page that has all user access, and then log off while on the About Us page, it will stay at that page and not redirect me to the redirect page I set in the user settings page (under the admin/user authentication section).  I don't think this is expected behavior.  A quick workaround that doesn't require recompiling this module is to make all pages with "All Users" to be marked with Unathenticated User and Registered Users instead of All Users.  Otherwise a more permanant fix is to change the code in the module.  I have identified the offending line of code.

   Public Shared Function GetLogoffRedirectURL(ByVal settings As PortalSettings, ByVal request As HttpRequest) As String
            Dim _RedirectURL As String = ""
 
            ' check if anonymous users have access to the current page
            If settings.ActiveTab.AuthorizedRoles.IndexOf(";" & glbRoleAllUsersName & ";") <> -1 Then
                ' redirect to current page
                _RedirectURL = NavigateURL(settings.ActiveTab.TabID)
            Else ' redirect to a different page
                Dim setting As Object = UserModuleBase.GetSetting(settings.PortalId, "Redirect_AfterLogout")
 
                If CType(setting, Integer) = Null.NullInteger Then
                    If settings.HomeTabId <> -1 Then
                        ' redirect to portal home page specified
                        _RedirectURL = NavigateURL(settings.HomeTabId)
                    Else ' redirect to default portal root
                        _RedirectURL = GetPortalDomainName(settings.PortalAlias.HTTPAlias, request) & "/" & glbDefaultPage
                    End If
                Else ' redirect to after logout page
                    _RedirectURL = NavigateURL(CType(setting, Integer))
                End If
            End If
 
            Return _RedirectURL
        End Function
 
New Post 5/23/2008 3:28 AM
User is offline Scippy One
149 posts
9th Ranked


Re: Redirect after Logout no longer works in 4.8.2 

*************************************************************

Well! I've solved the logout issue about DNN 4.8.2 version.

Go under admin\Authentication directory of your DNN installation and open the Logoff.ascx.vb file. Here you must modify the redirect sub in this way:

************************************************************

         Private Sub Redirect()
            ' Redirect browser back to portal logout page
            Response.Redirect(RedirectURL, True)
        End Sub

************************************************************

Then add the redirectURL property (copy and paste below)

*************************************************************

         Protected ReadOnly Property RedirectURL() As String
            Get
                Dim _RedirectURL As String = ""

                Dim setting As Object = UserModuleBase.GetSetting(PortalId, "Redirect_AfterLogout")

                If CType(setting, Integer) = Null.NullInteger Then
                    If Not Request.QueryString("returnurl") Is Nothing Then
                        ' return to the url passed to signin
                        _RedirectURL = HttpUtility.UrlDecode(Request.QueryString("returnurl"))
                        ' redirect url should never contain a protocol ( if it does, it is likely a cross-site request forgery attempt )
                        If _RedirectURL.Contains("://") Then
                            _RedirectURL = ""
                        End If
                    ElseIf PortalSettings.LoginTabId = -1 And PortalSettings.HomeTabId <> -1 Then
                        ' redirect to portal home page specified    
                        _RedirectURL = NavigateURL(PortalSettings.HomeTabId)
                    Else
                        ' redirect to current page
                        _RedirectURL = NavigateURL(Me.TabId)
                    End If
                Else ' redirect to after logout page
                    _RedirectURL = NavigateURL(CType(setting, Integer))
                End If
                'replace language parameter in querystring, to make sure that user will see page in correct language
                If UserId <> -1 Then
                    If User.Profile.PreferredLocale <> CultureInfo.CurrentCulture.Name Then
                        _RedirectURL = UrlUtils.replaceQSParam(_RedirectURL, "language", User.Profile.PreferredLocale)
                    End If
                End If

                'check for insecure account defaults
                Dim qsDelimiter As String = "?"
                If _RedirectURL.Contains("?") Then
                    qsDelimiter = "&"
                End If

                Return _RedirectURL

            End Get
        End Property

 

Now the logout redirect to logout page setted in the user setting or to home page if nothing is setted

 

 
New Post 5/23/2008 5:28 AM
User is offline duchoangle
450 posts
vn.pijaja.com
8th Ranked


Re: Redirect after Logout no longer works in 4.8.2 

Thanks,

This fixed the bug for me.

Best regards,

Duc


Pijaja.Com - Innovative Site Builder

Sirius - Free skin for Dotnetnuke

 
New Post 5/25/2008 8:55 AM
User is offline Rodney Joyce
1663 posts
www.smart-thinker.com
5th Ranked




Re: Redirect after Logout no longer works in 4.8.2 

Just to confirm, this works in 4.8.0, so it must have been code changes in the 4.8.1/2 codeline that "unfixed" it.


Thanks,
Rodney
Smart-Thinker - Social Networking modules for DotNetNuke
The DotNetNuke Directory - Are you listed?
PokerDIY - Example Implementation of DNN Social Network
Do use DNN a lot? Try the DotNetNuke Toolbar to save you time!
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Chat About It!  Redirect after Logout no longer works in 4.8.2
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Swirlhost Inc.
Affordable DotNetNuke Hosting, Skin Development, Custom Module Development, and DotNetNuke Consulting. We will install your preference of DNN and now host with us and get a free license for the Swirl AJAX Chatroom Module.
www.swirlhost.com
Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DNNCovered.com - Your Offshore Dotnetnuke Partner
Dnncovered.com is the only Dotnetnuke offshore outsourcing center specializes in DNN skinning and module development with lowest pricing and quality service. Our staff is dedicated to websites based on DNN and our graphic designers are creative and imaginative well enough to provide customers the complete set of skinning solutions and packages
www.dnncovered.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP