Welcome Guest, Not a member yet? Register   Sign In
redirect problem

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') ?? '/';
            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.

Theme © iAndrew 2016 - Forum software by © MyBB