Quantcast
Channel: Authentication
Viewing all articles
Browse latest Browse all 8256

Re: external database info in more than 1 table

$
0
0
by Rik Strobbe.  

I just gave it a try and solved it myself:

in the file auth.php (in moodle -> ath -> db) I had to add 2 lines:

require_once($CFG->libdir.'/authlib.php');
require_once($CFG->libdir.'/adodb/adodb.inc.php');
require_once('update.php'); // added by RS: required for updating the moodle external authentication table

...

$extusername = textlib::convert($username, 'utf-8', $this->config->extencoding);
$extpassword = textlib::convert($password, 'utf-8', $this->config->extencoding);
DB_update($username);  // added by RS: update the moodle external authentication table

update.php is a small script with a function DB_update that based on the username finds the required user data in the different tables and updates the external authentication table.

 

Rik


Viewing all articles
Browse latest Browse all 8256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>