I am storing the following session variables
public function ingresoAction() {
$usuario = $this->request->getPost('usuario', array('striptags', 'trim'));
$password = $this->request->getPost('password', array('striptags', 'trim'));
$request = $this->request;
if ($request->isPost()) {
$usua = SeperPerson::findFirst("SEPER_USUARI='$usuario' AND SEPER_CLAVEX='$password'");
if (!$usua) {
echo "no encontrado";
} else {
$this->session->set("userId", $usua->SEPER_USUARI);
$this->session->set("email", $usua->SEPER_EMAILX);
$this->session->set("codigo", $usua->SEPER_CODIGO);
$this->session->set("username", $usua->SEPER_USUARI);
$this->session->set("registered", true);
$this->session->set("loggedIn", true);
$this->session->set("tipox", $usua->SEPER_TIPOXX);
$this->flash->success('Welcome ' . $usua->SEPER_NOMBRE);
if ($usua->SEPER_TIPOXX == 'U') {
return $this->response->redirect('carrito/carrito');
} ELSE {
return $this->response->redirect('index');
}
}
}
}
pero al presentarlas de la siguiente manera solo me presenta el texto "1"
echo $this->session->has("userId")
But in presenting them as follows, I only present the text "1"
The data is retrieved but not saved in the session variable or stored badly. What could it be?