Codeigniter hiding function name BUT keeping functionality Codeigniter hiding function name BUT keeping functionality codeigniter codeigniter

Codeigniter hiding function name BUT keeping functionality


Well, I'd say that session storage (and especially flashdata) is for this exact purpose - to redirect somewhere, but pass additional data. If you don't want to, you should probably just load a view without redirecting, and then in the page use HTML5 history API to modify the contents of the url bar.


Make the validation process part of the index function, then create a session variable called is_logged_in and set it to 1 when the validate credentials passes.

Then it's as simple as doing something like this:

if($this->session->userdata('is_logged_in')==1){    load the page here.} else {    load the login stuff here.}

That way if they aren't logged in they see the login form and any form validation errors pass back to the same URL and if they are logged in they just go to the normal page.