I'm trying to pass an array in redirect to another page but it say undefined variable user
return $this->response->redirect($this->MyHelper->Route('eb-user-verify-reset-password-code'), $User->toArray());
How can I access $user->toArray() in the redirected page?
I try to recive it like <?php var_dump($user);?> in my new page but it's throwing the below error:
Undefined variable: user in view on line 60 NULL Phalcon
Details:
I'm passing user details via redirect function to another page. So in the redirect I'm passing the user details as second param. But I'm getting error in the page where I want to receive the user details array.
Phalcon\Http\Response::redirect()will redirect using http and you can't pass any data unless using POST, GET, etcif you asking for another way to redirect with parameters you can use
Phalcon\Mvc\Dispatcher::forward()example:
refer to the documentation for more info https://docs.phalconphp.com/3.4/en/dispatcher#forwarding