MinnPost / object-sync-for-salesforce

WordPress plugin that maps and syncs data between Salesforce objects and WordPress objects.
https://wordpress.org/plugins/object-sync-for-salesforce/
GNU General Public License v2.0
96 stars 52 forks source link

Make sure a WordPress record is an object before loading its data and processing it #358

Closed jonathanstegall closed 4 years ago

jonathanstegall commented 4 years ago

What does this PR do?

This fixes #357. When running a WordPress action (user_register, etc.), this makes sure that the ID represents a WordPress object. If it fails to create a user without causing a WP error, for example, this will keep it from trying to create a Salesforce record.

How do I test this PR?

I found this issue when testing spam users. The user wasn't being created, but it also wasn't flagging an error so the plugin was trying to move on with it. This fixes that.