[Plugin: WP-Members] Phone instead of Email posted in email to admin
-
I noticed that the phone (I put a check on Day Phone) gets printed instead of the email address in the new member application notification email. The current code in wp-members/wp-members-email.php is
if ($wpmem_fields[$row][2] != 'user_email') { if ($wpmem_fields[$row][2] == 'user_url') { $val = $user->user_url; } else { $val = get_user_meta($user_id,$wpmem_fields[$row][2],'true'); } }
which does nothing if the meta is
user_email
. (It only tests if it’s NOTuser_email
.) So I changed the code toif ($wpmem_fields[$row][2] != 'user_email') { if ($wpmem_fields[$row][2] == 'user_url') { $val = $user->user_url; } else { $val = get_user_meta($user_id,$wpmem_fields[$row][2],'true'); } } else { $val = $user->user_email; }
which will update
$val
instead of just copying the last (and NOT updated) meta value which in my case is Day Phone.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: WP-Members] Phone instead of Email posted in email to admin’ is closed to new replies.