I started this post to know how i can get/set Values from the User Session(Symfony 1.4). The Get works perfectly but the Set never works. I can see in the Debug Modus that the Global Session($_SESSION) is updated but the User Session dont. I tried this way and this way and another one and at least this... Without Success. I never read about such a Bug from Symfony 1.4. I use as Browser(linux) Firefox and Chrome (I tested it into anonymus Tab too).
Debug Modus User looks like :
attributeHolder:
myNS: {
aValue: '15',
ns_15: {
Tel: '78568951',
myID: '15',
anotherID: '120',
anArray: [{
arrayID: '78',
Company: 'myComp'
}] },
ns_17: { ... }
}
I can change the aValue attribute, delete and reinsert it. But the ns_15 or ns_17 can be delete or change but this Change cant be affect (symfony Debug Mode) User, but just into $_SESSION (symfony Debug Modus Globals ) i can see the updated values.
Is there another way to set/change/delete or write a value into an User Session with symfony 1.4 or it's a Symfony Bug?
EDIT1
I just dont figure it out til i see this Bug and this Blog !! well i'm using AJAX to call the Controller. So that's maybe the reason why i cant write on Session. Another Way i can't really subclass sfWebResponse cause my actions already subclass sfActions. :(
EDIT2
Because Edit1 I tried to make this:
$sessionData = $this->getUser()->getAttribute("ns_15", array(), "myNS");//all good
$sessionData["Tel"] = "0111111110";
var_dump($sessionData["Tel"]);//show me 0111111110
$this->getUser()->setAttribute("ns_15", $sessionData, "myNS");
$this->getUser()->shutdown();
sfContext::getInstance()->getStorage()->shutdown();
The Behavior with reloading twice is solved,but still cant write into $_SESSION and USER SESSION. (Same Trouble too).