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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Redirect after Logout no longer works in 4.8.2Redirect after Logout no longer works in 4.8.2
Previous
 
Next
New Post
6/2/2008 8:13 PM
 

For the record, here is the original fix and here is the new issue I raised.

Alex Shirley has reported that this is no longer an issue in DNN 5.0 beta 4 as per his comment here.

I just want to add that I think Alex Shirley may be a robot ;)  I added a comment (I am in Australia and he is in the UK) and within a minute I had a reply! Impressive stuff...


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!
 
New Post
7/4/2008 11:24 AM
 

Scippy One wrote

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

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

 

I have just implemented this piece of code and yes it does fix the bug.

HOWEVER, it also seems to have introduced a new one. When a user logs out of the portal, if they log back in straight away they get redirected to the page they were on and not the home page.

Obviously once answer would be to reset the "redirect on Login" switch to the Home page, but I have over 100 child portals and I can't face going through each of these one at time!!!

I need the redirect at logoff for one VERY VERY important customer, but don't want all my other customers compromised by this.

So any ideas how I can get around this?

 


Blue & White hooped blood runs through my veins!
 
New Post
7/8/2008 9:50 AM
 

** POP **

Any ideas as to how to correct this behaviour?

 


Blue & White hooped blood runs through my veins!
 
New Post
7/14/2008 5:06 AM
 

ANOTHER Problem

If a user double clicks on the logout link (dnn:Login control), it simply logs the user out of the portal and leaves them in the home page - it doesn;t appear to call my logout page that I set in the user settings!

Any ideas???


Blue & White hooped blood runs through my veins!
 
New Post
8/20/2008 4:59 PM
 

I'm running 4.8.4 with Friendly URL's turned on.  I've set the re-direct to the Home page - yet when users log out, they are not re-directed.  Does anyone have a fix for  4.8.4 - my client is insistent on returning users to the home page after logging out...

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Redirect after Logout no longer works in 4.8.2Redirect after Logout no longer works in 4.8.2


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