Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: AuthMoodle.

AuthMoodle: Difference between revisions

From MoodleDocs
Line 3: Line 3:
* an extension of mediawiki's AuthPlugin class so that moodle users can sign in to a mediawiki with the same login/pw
* an extension of mediawiki's AuthPlugin class so that moodle users can sign in to a mediawiki with the same login/pw
* used in this https://docs.moodle.org mediawiki production site
* used in this https://docs.moodle.org mediawiki production site
* first posted by Martin Dougiamas in april 2006 in http://moodle.org/mod/forum/post.php?reply=220741 as an attachment
* first posted by Martin Dougiamas in april 2006 in http://moodle.org/mod/forum/post.php?reply=196104 as an attachment
* for mediawiki 1.7, I had to change line 33 to '''includes/'''AuthPlugin.php
* for mediawiki 1.7, I had to change line 33 to '''includes/'''AuthPlugin.php



Revision as of 22:30, 8 August 2006

AuthMoodle.php

  • an extension of mediawiki's AuthPlugin class so that moodle users can sign in to a mediawiki with the same login/pw
  • used in this https://docs.moodle.org mediawiki production site
  • first posted by Martin Dougiamas in april 2006 in http://moodle.org/mod/forum/post.php?reply=196104 as an attachment
  • for mediawiki 1.7, I had to change line 33 to includes/AuthPlugin.php

quoting Martin:

Save it in extensions/AuthMoodle.php.
Then you just put this in LocalSettings.php:
require_once( 'extensions/AuthMoodle.php' );
$wgAuth = new AuthMoodle();
$wgAuth->setAuthMoodleTablePrefix();
$wgAuth->setAuthMoodleDBServer('yoursite.org');
$wgAuth->setAuthMoodleDBName('yourdb');
$wgAuth->setAuthMoodleUser('yourdbuser');
$wgAuth->setAuthMoodlePassword('yourdbpass');