General developer forum

after login need redirect to previous url

 
Davo
Re: after login need redirect to previous url
Group Core developersGroup Particularly helpful MoodlersGroup 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.


 
Average of ratings: Useful (1)