The main thing i want to solve is to check user session when somebody want to access admin panel. I\'ve created MY_Controller class and placed it in library.
cla
Codeigniter introduced a new folder called core
where the libraries that doesn't require loading lives. The original CI_Controller class is one of them, so if you want the automagick pick up your MY_Controller.php
file you should place it under application/core
too.
When in doubt, check the extended class's original version under system
directory and mirror that under application
.
(Also in your first code example, i think you meant to extend CI_Controller
not CI_Session
)