I need to have a couple of links giving the user the choice to login using the English or French login page.
The problem is, under certain circumstances, the user is prompted to logout upon successfully login in.
Here is how to reproduce the issue using Moodle 2.5.1:
Step 1) Go to:
http://yoursite.com/login/index.php?lang=en
or
http://yoursite.com/login/index.php?lang=fr
The ?lang=xx is important to me here and is what is causing the problem. Without it, everything works as expected.
Step 2) Fail your first login attempt.
Step 3) Successfully login on the second or third attempt.
Step 4) You will be asked whether you really want to logout. THIS IS THE FIRST PROBLEM! You should not be prompted to logout while trying to login.
Step 5) If you click continue, you will always be prompted to logout each time you successfully attempt to login, even if you get it on the first attempt. THIS IS THE SECOND PROBLEM. Your choice in one session should not affect the next login session. If we resolve the first issue, this one should no longer be an issue.
Alternatively, if you click Cancel at the prompt, the cycle will end and you will be able to login normally on subsequent logins.
I have tested this with several themes including the Standard (Vanilla), Clean and Standard (legacy) themes. It happens with all of them so this is not theme related. I have also tried it in various environments including Apache on Windows (local install) and on Linux (on a live web server) and the outcome is the same.
Any suggestions on how to resolve this issue would be most appreciated.
Best regards,
Michael