Linking users in a table to other users in the same table

I’m trying to figure out how to design my database if I have a site where users can add other users as their favorites.

So, let’s say I’m logged in as John, and I got to Mary’s profile. On her profile I click the “Add as favorite” button, and she is added as a favorite to my profile. How do I translate this to the database?

I have thought about it, and in the following image you can see what I came up with:

Is this the way to go? Or am I doing something really stupid here?

That’s near enough, except that you don’t need an id for users_favorites. Use the combination of id_user and id_fav_user as the primary key. This will have the advantage that it will stop someone adding an existing favorite a second time.