Login as admin, set the debuging settings to allow for errors to be printed on screen and then try to login using an external user.
Having a look at the PHP error logs is a good idea too
I updated one of the new user entries in the database by adding a password but when I tried logging in I got Could not connect to the specified authentication database...
I know that I entered the database information correctly, because it was able to get the usernames for my 4 new users in the first place.
Here's something else I noticed when running this via command line: One of my new users has the same email address as a user already in the system, but the username is different (new student is expected to have username same as email address). It inserts the user but then detects the email duplication and outputs an error:
<div class="notifytiny" style="text-align:center">Duplicate entry 'email@example.com' for key 2<br /><br />INSERT INTO mdl_user ( AUTH, CONFIRMED, MNETHOSTID, USERNAME, LANG ) VALUES ( 'db', 1, 1, 'firstname.lastname@example.org', 'en_utf8' )<ul style="text-align: left"><li>line 1419 of lib/dmllib.php: call to debugging()</li><li>line 375 of auth/db/auth.php: call to insert_record()</li><li>line 45 of auth/db/auth_db_sync_users.php: call to auth_plugin_db->sync_users()</li></ul></div><br />
Error inserting user email@example.com
I tried looking for something in the Moodle Tracker regarding this, but I'm not really familiar with Moodle Tracker and I haven't found anything specifically about this yet. Does anyone know from experience if this works in Moodle 1.8 yet?
The sync_users function in auth/db/auth.php says in the comments :
Sync should be done by using idnumber attribute, not username.
-->>I must fill the idnumber collumn of mdl_user table. In the authenthication settings where do i mention it?
* You need to pass firstsync parameter to function to fill in idnumbers if they dont exists in moodle user table.
-->>Sorry i could not this point the! what is the firstsync parameter?
I am having some trouble trying to get the external DB authentication on www.cornwallscouts.org.uk
I have the auth/db/auth_db_sync_users.php running alongside my cron job - is this right? - as it doesnt seem to pull accross the user details...
But when I log in as a user in the external db - it creates a user in the mdl_user database, but doesnt pull accross the details from the external db.
I have the field mapping correct - checked that a million times...
Any help appriciated!!
Hi. I am encountering a similar problem as above. I am able to login users successfully using external db authentication via DSN and odbc_mssql. The problem is with the data mapping as it does not pre-fill the mapped fields. When 'update local' option is set to 'on every login' , previously filled entries become blank so I am assuming that the plugin is unable to retrieve or is getting blank values from the external database. My data mapping entries are correct and external database records used in testing have entries.
Mysql 5.6.12 as moodle core db
on Windows 8 pro 64 bit OS
External db is MSSQL 2000. I also tried on MSSQL 2012 with same results
Any help would be appreciated
Thanks in Advance,
After much searching I found that this is related if not the exact same bug previously reported MDL-7712" title="Fields not read from external database" class="issue-link">
and supposedly resolved from moodle 1.7 onwards. As suggested on the
thread by Phil Driscoll, I commented
$authdb->SetFetchMode(ADODB_FETCH_ASSOC) in line 150 of auth.php, and
true enough, it fixed the issue.