Until something more official gets implemented, you just need to hack your config.php with something like this. (No need to change any other file)
If you take manual control over the enrollments then another tricky thing you can do with existing code is this: have all the courses visible, but inside an invisible category. The category will not be shown anywhere to students or guests, but once users log in then all their OWN courses are shown on the front page as "My courses".
General developer forum
Hiding courses based on login info
This discussion has been locked so you can no longer reply to it.