Codeigniter 3.0 security by methods -


my doubt is: there way in codeigniter

<?php defined('basepath') or exit('no direct script access allowed');  class users extends ci_controller {    public function __construct()      {          parent::__construct();      }    //this method user admin permission can access   public function onlyadmin(){   }   //this method user  can access   public function alluser(){   } } 

something or more dynamic.

thanx time.

the easiest way use authentication library since you'll need authentication @ point in app. there large number available codeigniter each own merits , weaknesses in different situations.

have @ this post overview of few , see if there's 1 that'll suit needs.

you'll want 1 supports different user groups. way when user lands on page can check group (admin / user / not-logged-in) , direct them or render page accordingly. use case statement runs different function each group. these functions should render page need specific customisations each user group.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -