Authentication

 
 
Picture of Lahiru Silva
Dual External database Authentication
 

Hi ,

I new to the moodle and I created a one external database using "http://localhost/moodle/admin/auth_config.php?auth=db". But I need to another database to authenticate.But there is no plugin to add another.So how I need to add the new database to authenticate the users?I was trying to edit the lib/moodlelib.php (The function is authenticate_user_login()).

Thank You ,

Lahiru

 

 
Average of ratings: -
Picture of Andrea Bicciolo
Re: Dual External database Authentication
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators
Hello,

if you want to authenticate against two different databases, an easy way is merging your users on a single table from the two db and just use one Moodle plugin. On the other way you could duplicate the auth plugin, renaming what is needed to avoid naming conflicts.
 
Average of ratings: -
Picture of Lahiru Silva
Re: Dual External database Authentication
 

Thanks your thoughts,But it should be the two database and that can not be merge

 
Average of ratings: -
Picture of Lluís Forns Puigmartí
Re: Dual External database Authentication
 

Why don't you create a SQL view merging making a UNION of both databases? I don't know the perfomance impact of this; but being called just at login it should be great.

 
Average of ratings:Useful (1)