Make My Profile Public
This module allows users to set their profile to be private, restricting access to their profile page for visitors, while still respecting the "view user information" permission. Users can configure this setting on their profile's edit form.
This module will give users an option to choose to have public or private profile access. If they decide to keep the profile private the visitor of /user/{user} page will show an access denied. This option will not override the `view user information` permission. So, you need to give the targeted role `view user information` in order to allow them to view the profile if the user chose to have a public profile.
The default behavior of the users will have a private profile unless he checked the option.
The user is able to change this option from the user add or edit form.