We have login forms on 3 different websites (different students will log in from a different website). Currently we have $CFG->alternateloginurl set in config.php to only one of the websites.
We want to be able to redirect anyone who needs to log in to a dynamically chosen website.
I can work out which login URL each user needs to use, but is there some way to dynamically change the alternate login URL without hacking the core code?
Thanks