Our current setup involves a multisite for different parts of our company. We need all sites to share a single user pool for various reason, but each site has slightly different user profile regulations that we need to adhere to. We have different permissions for profile fields on each site, so I need to prevent user profiles being saved if a user isn't on their home site.
I have a field in every profile called "Domain". I intend on pairing this to the current site url to determine if the user is on their home site or not. If not, I need to stop all user_saves from completing. What would be the best way of going about this?
I've found in D6 hook_validate('user') would have done the trick, but there doesn't seem to be anything in D7 that I can use. Would hook_presave work, if I throw an exception?