How is email pulled from the database?

Hello everyone,

I was wondering where in the code a user's email address is referenced in the db. My goal is to remove email's being stored in the DB (I can make a soap call to get their email from another place they've registered) and replace the spots where it's pulled with the soap call. Any help or insight is greatly appreciated.

Thank you!

Jake Bunce

XenForo moderator
Staff member
First you would look to the user datawriter:


The _getFields() function defines all of the db columns for users which includes the email column.

Then there is the user model which has some email functions:


Those are the two big ones but there are many more. You need to search the contents of library/XenForo for "email".

Rather than try to remove the emails I suggest synchronizing your two databases to write out email changes to XenForo's xf_user table. That way no software changes are required.