Welcome Guest, Not a member yet? Register   Sign In
Call to a member function on a non-object
#11

[eluser]Cristian Gilè[/eluser]
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Security
{
    var $ci;
    
    function __construct()
    {
       $this->ci =& get_instance();
    }    

    function is_logged_in($logged_in)
    {
       ........
       ........
       ........

then, to access to uri and session libraries methods:

Code:
$segment = $this->ci->uri->segment();
$priv = $this->ci->session->userdata($segment);

Cristian Gilè
#12

[eluser]Muncken[/eluser]
And then it works! Thank you very much Christian. I wish you all the best, thanks again.
#13

[eluser]Unknown[/eluser]
Okay. Here is how it works for me...

I need to include database library to the autoload... Then problem is resolved.




Theme © iAndrew 2016 - Forum software by © MyBB