2

I have a moodle installation on centOS with two folders (virtual hosts)- /2012 and /2011. When browsing to "http://my.moodle/2012" or "http://my.moodle/2011" and authenticating (to either one), how can i automatically be authenticated to the other one?

more clearly: when I authenticate to 2011 I would like to be authenticated also in 2012 and vice versa.

is that possible?

John
  • 21
  • 1

1 Answers1

0

This is true for all web applications, but basically, using the same basic domain name should allow you to share the cookie related to the sites, unless there is a "cookie path" defined (in your case to /2011 or /2012). Cookie paths are likely to be defined

You say you have a moodle installation, so I assume you have only one installation and you are accessing it through 2 different virtual hosts which point to the same directory on disk, right?

I've been skimming through the Moodle code and the only reference I found to cookies paths is in /lib/cookies.js. Maybe that launches you in the right direction. In any case, once you get rid of the path part, and given you're on the same domain, you will be able to connect to one or another freely once you logged in into one of them.

ywarnier
  • 11
  • 1