title: Moodle Accept Login from external site
body: <p>We are adding Moodle to our site (different server, different sub-domain, but same main domain, and the servers are set up to be able to communicate with each other) and what we want to have it do is:</p>
  
  <ul>
  <li>User accesses the main site</li>
  <li>User logs in</li>
  <li>User clicks a link to Moodle</li>
  <li>The user is automatically logged into Moodle without having to reenter their info</li>
  <li>If the user bookmarks or directly accesses Moodle, they can still login directly there</li>
  </ul>
  
  <p>We already have it set up using db auth (the external database authentication) so the accounts from the main site also work for Moodle, I just have no idea how to get Moodle to accept the existing credentials and automatically log the user in.</p>