Page visible even after logging out

Re: Page visible even after logging out

by Harold Sabanal -
Number of replies: 0

Hi,

Good day folks!

I'm just new here and I'm thankful for all the insights and help I've got from this forum.

Now I guess its my turn to give back.


I've been also disturbed by this issue, posted above, since it will really cause a big trouble for users especially for the new ones. We are using an authentication plugin called 'lenauth' and we are authenticating through gmail account but restricted only to two domains. Previously when a user authenticates with an email not under the valid domain MOODLE will throw an error then re-authenticating with an email under the valid domain will also return an error which should not be the case. Then I tried reversing the process, authenticating first with the valid email and viola, I got a successful login but then surprisingly logging out of the account then re-authenticating with an email not under the valid domain will still have a successful login but the account is the account under the email with the valid domain. I did further tests until such time I have come to clear browser cache and found out that it was the cache causing the issue. I have search through different forums for various solutions until I've got the following:

Just add these few lines of html code in the index.php file under the login directory of MOODLE:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>

<meta http-equiv="Pragma" content="no-cache"/>

<meta http-equiv="Expires" content="0"/>

I'm not really sure if this solution of mine is appropriate but I find it worth sharing.


Thanks.