how to redirect session login url in moodle

Issue

Moodle normally redirect to login page when session Timeout.

Is there any option to redirect another page url instead of going to

$CFG->wwwroot.'/login/index.php'

Solution

You can override the default login page by setting $CFG->alternateloginurl via the admin interface at /admin/settings.php?section=manageauths. Any redirects requiring user login will then automatically point to your custom location instead.

Answered By – Tony

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published