Support Forum
I've noticed that after a profile update, the wordpress email is not updated.
Is it a normal behaviour?
however currently i'm using sph_UpdateProfileSettings filter with this instruction:
wp_update_user( array( 'ID' => $thisUser, 'user_email' => $_POST['email'] ) );
I've also noticed that this filter have only the user id as parameter but if i've to retrieve the email i should use the $_POST variable.
Won't be better to pass the updated user object with new email ?
Yehonal said
I've noticed that after a profile update, the wordpress email is not updated.
Is it a normal behaviour?
Really? It does for me and, as far as I am aware, all of our other users...
however currently i'm using sph_UpdateProfileSettings filter with this instruction:
wp_update_user( array( 'ID' => $thisUser, 'user_email' => $_POST['email'] ) );
I've also noticed that this filter have only the user id as parameter but if i've to retrieve the email i should use the $_POST variable.
Won't be better to pass the updated user object with new email ?
Possibly I would have to check the code but we can't change an existing filter in case it is being used by anyone.
YELLOW
SWORDFISH
|
you can get the user object from the user id that is passed... we dont actually update a user object per se, we update the info in the database directly... so if we were to want to pass the user object, we would have to fetch it from the database... and this would be an additional db query just for passing in the filter... seems kind of a wasteful query if its not used within the code... seems more prudent for the filter receiving end to do the query if needed...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)