Custom site registration form

Svar: Custom site registration form

by David Bennett -
Number of replies: 0

Update:

It's complaining about null values being written to the db. The value in question is the first custom select element but I can read and manipulate that in the validation function and the output buffer below shows that there is a value to the data.

The data with field id == 3 is [profile_field_employerType] => municipality

Can anyone offer an explanation?


Thanks

Error writing to database
More information about this error
Debug info: Column 'data' cannot be null
INSERT INTO mdl_user_info_data (userid,fieldid,data) VALUES(?,?,?)
[array (
0 => 28,
1 => '3',
2 => NULL,
)]
Error code: dmlwriteexception
Stack trace:
  • line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 147 of /user/profile/lib.php: call to mysqli_native_moodle_database->insert_record()
  • line 491 of /user/profile/lib.php: call to profile_field_base->edit_save_data()
  • line 100 of /auth/email/auth.php: call to profile_save_data()
  • line 70 of /login/signup.php: call to auth_plugin_email->user_signup()
Output buffer: stdClass Object ( [firstname] => test@test109_2.com [lastname] => test@test109_2.com [email] => test@test109_2.com [email2] => test@test109_2.com [username] => test@test109_2.com [password] => test@test109_2.com [profile_field_gender] => 0 [profile_field_dateofbirth] => 1427324400 [profile_field_careworker] => 0 [profile_field_employerType] => municipality [profile_field_municipality] => 0127 [submitbutton] => Create my new account [confirmed] => 0 [lang] => en [firstaccess] => 1427372339 [timecreated] => 1427372339 [mnethostid] => 1 [secret] => eEgEk66FC5Ob0Jm [auth] => email [firstnamephonetic] => [lastnamephonetic] => [middlename] => [alternatename] => )