![]() |
|
Thread Tools |
#1
|
|||
|
|||
Profile field save hook?
I am creating a product that adds a new profile field. When the user changes this value, I would like to run some custom PHP code. Can anyone tell me the the name of the hook to do this?
Bonus question: For my product, I want to add a Scheduled Task, is the only way to do that is by running a SQL INSERT or is there a more graceful way? No members have liked this post.
Last edited by heat23; 21 May 2016 at 17:31. |
#2
|
||||
|
||||
Try the hook "profile_updateprofile" to answer your first question.
For running schedules tasks, you can attach code to be run to your cleanup tasks...examine the hooks beginning with "cron_" depending on how often you want the code to be executed.
__________________
Former vBulletin.org Staff Member ![]() Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons No members have liked this post.
|
#3
|
|||
|
|||
Originally Posted by MarkFL
Thanks Mark. I tried using profile_updateprofile but it doesn't seem to be firing my plugin code. When saving a profile, it is actually going to ajax.php:![]()
if ($_POST['do'] == 'profile_updateprofile') { .... } However, there is no "hook" statements in here. UPDATE I think I need to use "ajax_complete" hook...trying it now No members have liked this post.
Last edited by heat23; 21 May 2016 at 20:55. |
#4
|
||||
|
||||
Yes, the hook I cited only works if the user is updating their profile from the settings page, not from their "About Me" on their profile page.
__________________
Former vBulletin.org Staff Member ![]() Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons No members have liked this post.
|
#5
|
|||
|
|||
Originally Posted by MarkFL
I guess I would need to make my code work in both places. Seems like ajax_complete would work when updating the 'About Me' page, but it didnt ![]()
![]() No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 16:49.