We have moved to Github. Please open tickets there.

Opened 20 months ago

Last modified 18 months ago

#3934 new Feature Request

Functionality for saving/reading "last forward from" url

Reported by: juho.jaakkola Owned by:
Priority: normal Milestone: Near Term Future Release
Component: Core Version: 1.8
Severity: minor Keywords:
Cc: brett@…, juho.jaakkola@… Difficulty:

Description

Elgg core uses a session variable called last_forward_from. The variable is given value in gatekeeper() and admin_gatekeeper() functions and it is read in "action/login" action.

The purpose being:

  1. Non-logged-in user tries to access privileged page
  2. Access is denied
  3. The url of the page is saved to $_SESSION("last_forward_from")
  4. User is forwarded to Elgg front page
  5. User signs in
  6. The last_forward_from variable is checked and if value is found the user is forwarded back to the page that denied access in the first place

So far the variable is meant to be used only internally by the engine. There would be however need for similar variable to be used by plugin developers when developing authentication plugins which implement third party authentication.

After successful authentication the plugin would read the variable and forward user back to the page where the authentication was requested.

So there's a need for example for a wrapper function saving/reading the $_SESSIONlast_forward_from? variable. It could be named for example "set_forward_url" or "set_sticky_url" etc.

Change History (3)

comment:1 Changed 20 months ago by juho.jaakkola

  • Cc juho.jaakkola@… added

comment:2 Changed 20 months ago by cash

Perhaps adding this as a method on ElggSession would make the most sense.

comment:3 Changed 18 months ago by cash

  • Milestone changed from Needs Review to Near Term Future Release
Note: See TracTickets for help on using tickets.