I’m using OJS3 and here we need ORCID iD in registration form.
I modified the file lib/pkp/templates/frontend/components/registrationForm.tpl
Added in lines 83-90
Alongside with changes in the template (e.g., with overriding it from a plugin), this should be enough to save the data in the user_settings table. Keep in mind that this table already has orcid setting.
I would avoid any modifications of OJS core files, as an OJS upgrade can become problematic in this case.
To save in the database? UserDAO class is responsible for interactions between User class and Database layer. Keep in mind that you already have orcid in the user_settings table.
So, you need to retrieve User object ($user), retrieve data from the form, then setData('orcid') on the $user , then UserDAO->updateObject($user).
On second thought, I see that User class already has updateSetting method, so, theoretically, you can use it.
All this is native to the system and can be achieved from a plugin through hooks.