![]() |
Extended model not saving additional fields - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: Extended model not saving additional fields (/showthread.php?tid=88953) |
Extended model not saving additional fields - Pizote - 12-08-2023 I am using CI4 with Shield. I have extended the shield UserModel to add some additional fields. The field names match in the form, the model, and the db. I cannot get the canned Shield registration page to save the additional fields. There is no entry in the log files, and there are no validation issues. All of the other fields in the original register form are saving to the db. Any ideas as to what I am missing here? UserModel PHP Code: declare(strict_types=1); Register form: PHP Code: <!-- First Name --> RE: Extended model not saving additional fields - datamweb - 12-08-2023 See https://github.com/codeigniter4/shield/discussions/333 RE: Extended model not saving additional fields - Pizote - 12-08-2023 (12-08-2023, 12:38 PM)datamweb Wrote: See https://github.com/codeigniter4/shield/discussions/333 Step six did the trick. Changing the public string to: PHP Code: public string $userProvider = \App\Models\UserModel::class; Thank you! RE: Extended model not saving additional fields - datamweb - 12-09-2023 Thanks for the feedback. The documents have been updated. https://github.com/codeigniter4/shield/pull/977 |