Hide Navigation for My Profile > Messages

To hide the navigation: My Profile > Messages for all users:

1. This is set by the configuration value messaging
2. You can either update the value of this in the database (config table) from 1 to 0 OR you can add an entry in config.php where you set $CFG->messaging = 0;
3. Clear the moodle cache