• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
redirect problem

#1
a problem with a redirect function, it returns an object and requires a return.
here is my code
PHP Code:
public function login()
    {
        if ($this->CI->auth->check())
        {
            $redirectURL session('redirect_url') ?? '/';
            unset($_SESSION['redirect_url']);
            return redirect()->to($redirectURL);
        }

        $_SESSION['redirect_url'] = session('redirect_url') ?? previous_url() ?? '/';
        $this->CI->data['config'] = $this->CI->config;

        return $this->CI->tmpl->view('ModAuth/site/auth/login'$this->CI->datatrue);
    
and for this I get an error because it returns a redirect object and it turns out that the template is unloaded and the error starts to sypats.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.