External Database Problem

External Database Problem

by Bilal Şentürk -
Number of replies: 9

Hello to everyone,

I have a problem with the external database. I've done a lot of research on this but couldn't find a solution. I explained what I did with pictures below. If you know what this problem is, please write.

Thank you from now.


1 - I have two servers. Users on the first server (not moodle). I have a table here and I choose the data in that table.


2 - external database


3 - test setting


4 - Result: User names added. However, he did not import his passwords from the external database. No name, no last name, no other information.


5 - As you can see here, it adds users from the external database. However, it only imports the user name. He does not import the password required for users to log on.


How do you think I can solve this problem? smile

I appreciate your help and answers.

Average of ratings: -
In reply to Bilal Şentürk

Re:

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Moving to authentication forum.
However, you have passwords in your setting instead of password.
Did you fill out the datamapping fields at the bottom of the authentication settings?
In reply to Emma Richardson

Re:

by Bilal Şentürk -
Hi Emma gülüyor
Thank you for your feedback.
I made the password> passwords correction after I posted the message. But this is not the problem because the problem is not resolved.
In reply to Bilal Şentürk

Re:

by Bilal Şentürk -
anybody have an idea?
In reply to Bilal Şentürk

Re:

by Mathew Gancarz -
Picture of Core developers
Take a look at https://moodle.org/mod/forum/discuss.php?d=345113
The external database authentication plugin does not actually copy the password from the external database to the password field in moodle users table. You should see the password field either as blank or 'not cached'. This is normal.

For the names not showing up, check the data mapping settings and the 'update local' setting: https://docs.moodle.org/37/en/External_database_authentication#Field_mappings
In reply to Bilal Şentürk

Re:

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Can you answer Emma’s question about data mapping? Your database table shows name as one field - Moodle requires firstname and lastname so how have you mapped that?
In reply to Bilal Şentürk

Re:

by Camilo Esteban Garzón Casallas -

Hi,

Did you fix it? I have the same problem. Moodle is not mapping the information from an external database. I configured all fields I need and is not working!

In reply to Camilo Esteban Garzón Casallas

Re:

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Are you actually connecting to your external database? Have you tested the settings? Can you provide screenshots to help with troubleshooting?
In reply to Jon Bolton

Re:

by Camilo Esteban Garzón Casallas -
Hi Jon,

Yes, I tested the connection and I can login, but is not saving in Moodle database the name, last name, email. etc. I hope this screenshots can help!

Database connection:

Mapping the name (for testing)

Fields in database


If you need more information please let me know.

Thank's a lot!

In reply to Camilo Esteban Garzón Casallas

Re:

by Camilo Esteban Garzón Casallas -
I solved! I made a mistake, one field was missing in the database and I was calling it from Moodle, because of that Moodle was not mapping data. When I solved it Moodle just put the information in local database.

I hope this can be useful for someone else.

Thanks guys!