We're currently trying to set up the Microsoft plugins for Open ID Connect login.
After setting all the Azure AD settings etc. in Moodle we're running into issues with our first test user.
When I try a login I run into the error screen below
On checking the server error logs we see there's an entry below:
[Thu Jul 30 10:00:05.781170 2020] [php7:notice] [pid 25848] [client 192.168.231.159:55530] Default exception handler:
Error writing to
database Debug: Field 'country' doesn't have a default value\n
INSERT INTO mdl_user (lang,idnumber,firstname,lastname,email,city,auth,username,confirmed,lastip,timecreated,timemodified,mnethostid,calendartype,maildisplay,mailformat,maildigest,autosubscribe,trackforums) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\n
[array (\n
0 => 'en',\n
1 => 'cbteststu0567@students.xxx.ac.uk',\n
2 => 'cb',\n
3 => 'teststu',\n
4 => 'cbteststu0567@students.xxx.ac.uk',\n
5 => '',\n
6 => 'oidc',\n
7 => 'cbteststu0567@students.xxxx.ac.uk',\n
8 => 1,\n
9 => '192.168.xxx.xxx',\n
10 => 1596099605,\n
11 => 1596099605,\n
12 => '1',\n
13 => 'gregorian',\n
14 => '2',\n
15 => '1',\n
16 => '0',\n
17 => '1',\n
18 => '0',\n
)]\n
Error code: dmlwriteexception\n
* line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown\n
* line 1357 of /lib/dml/my
sqli_native_moodle_database.php: call to moodle_database->query_end()\n
* line 1403 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()\n
* line 111 of /user/lib.php: call to mysqli_native_moodle_database->insert_record()\n
* line 4049 of /lib/moodlelib.php: call to user_create_user()\n
* line 465 of /auth/oidc/classes/loginflow/authcode.php: call to create_user_record()\n
* line 269 of /auth/oidc/classes/loginflow/authcode.php: call to auth_oidc\\loginflow\\authcode->handlelogin()\n
* line 107 of /auth/oidc/classes/loginflow/authcode.php: call to auth_oidc\\loginflow\\authcode->handleauthresponse()\n
* line 165 of /auth/oidc/auth.php: call to auth_oidc\\loginflow\\authcode->handleredirect()\n
I've taken a look out our site settings and it appears that the default country is set to UK
Any thoughts on what might be going wrong here?