Problem:
Waldermar want to trigger his custom PHP function after the user is created by CRED form
Solution:
f you only need to trigger the action you mentioned above after the CRED form submitted, I suggest you try CRED action hook: cred_save_data
Also you can use WordPress build-in action hook user_register, which will be triggered in most cases(including CRED new user form), see document:
https://codex.wordpress.org/Plugin_API/Action_Reference/user_register
with the parameter $user_id, you can get the user_name of new user, function get_userdata()
$user_info = get_userdata(1);
$username = $user_info->user_login;
Relevant Documentation:
https://codex.wordpress.org/Function_Reference/get_userdata
https://toolset.com/documentation/user-guides/cred-api/#csd
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 2 replies, has 2 voices.
Last updated by waldemarW 8 years, 1 month ago.
Assisted by: Luo Yang.