Search code examples
phpauthenticationmoodle

how to redirect session login url in moodle


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.