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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Quick Login "Return to Page" QuestionQuick Login "Return to Page" Question
Previous
 
Next
New Post
1/26/2007 2:38 PM
 
How do I set the login page to return to whatever page a user was on when they clicked on “Login”?
 
New Post
1/26/2007 3:18 PM
 
You can define a module as follows and add it to your login page. I suppose a skin object would also work

<%@ Control Language="VB" ClassName="LoginRedirect" Inherits="DotNetNuke.Entities.Modules.PortalModuleBase" %>

<script runat="server">

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Page.Request.IsAuthenticated Then
Dim returnUrl As String = Request.QueryString("returnurl")
If Len(returnUrl) > 0 Then
Response.Redirect(returnUrl)
End If
End If
End Sub
</script>

Qualtiy DotNetNuke modules and custom development; we've been serving the DNN community for over 2 years and have hundreds of satisfied customers. Let us serve you today.
 
New Post
1/26/2007 7:11 PM
 
Thanks for the reply!  Ok, I think I'm going to need a little bit more help with this.  I've been using DNN for almost a year, but have no clue how to go about defining a module.  I do have good DNN skills, but have never been down this path before.  Any further assistance you can provide would be greatly appreciated!

Thanks!
 
New Post
1/26/2007 8:53 PM
 
I don't dispute that the "define a module" technique will or will not work for this- but it seems like the long way around.

I thought that if you did NOT define a "home page" then the login would take you back to the page you left... If that isn't the short answer, it is at least something along those lines.

I know there is a simpler way to do what you are asking, apart from defining a module for this purpose.

** ooops, almost forgot: "what version of DNN?" **


 
New Post
1/26/2007 9:17 PM
 
In more recent versions (3.3/4.1 and up) this is supposed to be the default behavior (return user to prior page after login):

- Preserve Login Parameters - when a user is directed to the login screen, the system needs to retain the original url ( with parameters ) so that it can redirect back after successful login ( especially useful in nested module UIs like Forum )
The flip side of this coin is to direct the user to a specific  page after login: Admin>User Accts>User Settings
From there, a specific page can be defined-- IF one has already been defined, you may need to select <none> ...


 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Quick Login "Return to Page" QuestionQuick Login "Return to Page" Question


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