CodeIgniter Forums
Function level authentication - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Function level authentication (/thread-45763.html)

Function level authentication - El Forum - 10-05-2011


I'm authenticating users in core\MY_controller.php in construct()
using code
if (!$this->ion_auth->logged_in())
further in a class I'm authorizing functions as
class Bills extends MY_Controller {
function __construct()
$c = $this->uri->rsegment(1); // The Controller
$f = $this->uri->rsegment(2); // The Function  
if (!($this->_allowed_function($c,$f))
I am using Dynamic_menu.php with tables dyn_menu and function_mapping to generate drop down menu specific to login\role.

Now my issue is that there are a few functions, which I need to call through forms submission, and also AJAX requests, how do I authenticate these.

Thanks in advance.