I have the following (highly simplified) database schema:

![Simplified Database Schema](https://i.stack.imgur.com/n5cPY.png)

In summary:

* An account has one user (one-to-one)
* An account has many projects (one-to-many)
* A project has multiple users (one-to-many)

My concern is that the user belongs to the project, and the project belongs to the account, yet using this schema *there's no way to guarantee that a user that belongs to an account also belongs to the account that belongs to a project.*

**My question is this:** Is there a way to use MySQL to add a constraint to ensure that the user that belongs to a project also belongs to the account that belongs to the project?

I'm using MySQL 5.1.56.