Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.
NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
danieltj wrote: Tue Jul 16, 2024 4:46 pmUse the core.ucp_profile_info_modify_sql_ary event which is run just before the profile information is saved to the database. You can update the relevant profile field during that event before it's saved to the database.
Referenced in ucp_profile.php on line 400.
It’s documented above in the file. You should be able to read the code before the event and figure out what you need to do. To make it easier use var_dump to see the contents of the variables.
Hervé wrote: Wed Jul 17, 2024 8:17 am
This is the full added code, comments welcome
in /includes/ucp/ucp_profile.php after $vars = array('cp_data', 'data', 'sql_ary'); add
Clarification: the field is correctly calculated if the member modifies his profile, not when he enters it for the first time.
Perhaps I should also add my code into \includes\ucp\ucp_register.php
just before