WP prepending e-mail with the word ‘Email’
-
Hello,
I have written a plugin to validate users by calling a java servlet and processing the response. I add new users to wp_users via wp_insert_user and update users via wp_update_user. All is well, except that the e-mail address is being prepended with the word “Email”.
Here’s the debug coded I added for a new user:
foreach ( $userarray as $key=>$value ) { echo '<br />'.$key.' '.$value; }
RESULT:
user_login usernewtest10
user_pass secretpassword
first_name
last_name Besancon
user_url
user_email [email protected]
description 123456789
aim
yim
jabber
display_name usernewtest10Then I execute this code:
if ($id = username_exists($username)) { $userarray['ID'] = $id; wp_update_user($userarray); } else { wp_insert_user($userarray); } echo '<br />Has my e-mail changed??? '.$userarray['user_email'];
RESULT: Has my e-mail changed??? [email protected]
All good, right? Except the e-mail address has been stored as [email protected]. Since I can’t show you a screen shot of the admin screen, here’s some sql that shows the result:
select user_login, user_email from wp_users where user_login = 'usernewtest10'
RESULT:
user_login user_email
———- ———-
usernewtest10 [email protected]Does anyone have any idea why this is happening? I checked the other plugins that were installed, and none of them appear to have anything to do with e-mail addresses.
Thank you in advance!
- The topic ‘WP prepending e-mail with the word ‘Email’’ is closed to new replies.