after login need redirect to previous url

Re: after login need redirect to previous url

על ידי Davo Smith בתאריך
מספר תגובות: 1
תמונה של Core developers תמונה של Particularly helpful Moodlers תמונה של Peer reviewers תמונה של Plugin developers

That sounds like exactly what the code already does as standard - when a Moodle page calls 'require_login' and the user is not already logged in, then the code saves the current URL (as $SESSION->wantsurl) and redirects to the login page. After login, the saved URL is returned to.


בתגובה ל: Davo Smith

Re: after login need redirect to previous url

על ידי William Workman בתאריך

This is good information. I am using the Joomdle bridge to connect my moodle and joomla user database and login for a Single Sign On. When a user logs in or creates an account, they do so on the joomla side and the bridge logs them into both sites. However, I want the user to be redirected to the url that moodle stored in $SESSION->wantsurl. Problem is I don't know how to allow the joomla login page(an external site from moodle) to use this variable so I can redirect to its location. Any ideas how to allow external sites to access the "$SESSION->wantsurl"? Thanks.