checkpassword($username, $password)) { echo 'Auth-Method-False'; return true; } else { echo 'Auth-Method-False'; return false; } } } /** * Look if User is logged in and return uid * it tries to work always with CI session * Otherwise return false * * @return string or (bool)false */ function getAuthUID() { $ci =& get_instance(); // get CI instance $ci->load->library('AuthLib'); // load authentication library return $ci->authlib->getUser(); }