[eluser]Unknown[/eluser]
So, I've been working on a project with a forum page for awhile. So, I need to check if a user is logged in, is able to edit/delete their own (or any other if they're, say an admin or moderator) posts etc. My login and forum controllers are separated.
Now, my question is, I've been reading the user guide and some forum posts on this forum, and I'm not sure what I should go with.
Should I create a library containing my custom functions [like
check_logged_in()] in
application/libraries folder where I need to call CI as a reference [$CI =& get_instance()] or create a MY_Controller file with one or more classes extending CI_Controller in
application/core. I got them both work in a way or another, though MY_Controller seems to be a better practice to me as I can directly use $this.
But what confused me is people telling about putting files in application/library on this and some other forums.
How does going with either effect the performance? Or is it a matter of preference?