Welcome Guest, Not a member yet? Register   Sign In
could not redirect page when no session

//helper function 

function check_session_set() {
    $session      = \Config\Services:Confusedession();
    if( $session->has( 'id' ) ) {}
    else {
    echo 'test';
    return true;


    public function initController(\CodeIgniter\HTTP\RequestInterface $request,       \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)

    parent::initController($request, $response, $logger);
    helper(['common_helper','form', 'file']);
    $validation = \Config\Services::validation();
    $this->session = \Config\Services:Confusedession();



when i logout and click back button the page did not redirect to login page.but echo 'test' message shows.
is there redirect work in helper function

Messages In This Thread
could not redirect page when no session - by durairaj - 11-06-2019, 03:16 AM

Theme © iAndrew 2016 - Forum software by © MyBB