I’m trying to allow a user to have multiple email addresses associated with their account. update_user_meta()
will not work because it will overwrite the current email. add_user_meta()
wouldn’t work either because it would duplicate the entry, even if it is the same email address.. Any ideas?
Leave a Reply
You must be logged in to post a comment.
You can use
update_user_meta()
andadd_user_meta()
, just store all the email addresses in an array in a new field. If you have a requirement, such as preventing duplicates, run a validation function that checks for that before updating the database.