modify submitted form data before save – UserPro Forums https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/feed/ Fri, 03 May 2024 01:44:24 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/#post-44756 <![CDATA[modify submitted form data before save]]> https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/#post-44756 Fri, 05 Dec 2014 15:01:51 +0000 Mad Max Is there an action or a filter I can use to modify form data after they are submitted, but just before they are saved?
I’m trying to make a registration form with username, display_name and password but whithout email address (my user has to register by cell-number as username and they will receive a confirmation code via sms), so I’d like to generate a dummy email address after the form is submitted, to make the registration process go through.

Please help!

I’m on:
Wordpress 4.0.1
UserPro 2.16

]]>
https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/#post-44797 <![CDATA[Reply To: modify submitted form data before save]]> https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/#post-44797 Mon, 08 Dec 2014 11:26:51 +0000 UserPro Support Team Hello ,
Apologies currently we do not have any such feature.Please feel free to let us know if there is anything else we can do to help you.
Thank you!

]]>
https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/#post-44806 <![CDATA[Reply To: modify submitted form data before save]]> https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/#post-44806 Mon, 08 Dec 2014 14:43:45 +0000 Mad Max I’ve resolved customizing the register template and adding an hidden input field named user_email, already filled with a dummy email address (using $uniq_id also).
As I have an italian cell number as username, I’ve then modified plugin’s ajax.php adding a new ajax_callback to check the correct syntax of the number.

Please consider to add some do_action before the most important action of your plugin, so developer can manipulate data after/before they are submitted, loaded, saved to db etc etc.
By the way, can I execute some code every time user profiles are saved? I know userpro sends an email at every profile change and I’d like to do some other actions on the saved data (without changing plugin code).

I’ve tried these wp hooks

add_action(‘personal_options_update’, ‘update_extra_profile_fields’,99);
add_action(‘edit_user_profile_update’, ‘update_extra_profile_fields’,99);

but they are fired ONLY on the back-end (as user profiles are editable only in the back-end by default). Is there something similar to use in the frontend on userpro “edit” template?

Thanks, Daniele.

]]>
https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/#post-46514 <![CDATA[Reply To: modify submitted form data before save]]> https://forum.userproplugin.com/forums/topic/modify-submitted-form-data-before-save/#post-46514 Wed, 11 Mar 2015 12:11:16 +0000 Tezzuya Ciao,
sei poi riuscito a far si che uno possa far eseguire del codice prima/dopo il salvataggio del profilo?
Se ci sei riuscito mi indicheresti dove mettere mano al codice?

grazie 1000

Matteo

]]>