Is there a hook for when a member's details are updated either by the user or by the admin system?
What i'm trying to do is have two custom fields; long and lat which are populated by using google maps api's geocoding functions.
I need this to be automatic so that when an account is created, a call is made and the long/lat fields are updated and if the user is updated then we check to see if the address data has changed and if it has, re-request the long/lat.
I can find hooks for member create but not for update unless i've not spotted something.
Is there one stashed away somewhere? Or is it possible I can crow-bar one in somehow?
The version of expression engine is 2.2.2
There is no hook for the update_member()
method, you are correct. You could look at using the session_start
hook, and then checking for $_POST['edit_profile']
within that hook method ... all of the new data should be in $_POST
, with $_POST['id']
being the member_id
.