Session deletion in Symfony 1.4

后端 未结 3 816
不知归路
不知归路 2021-02-10 06:04

How do I delete all session variables at once if they are not in Array?

PS I set them this way:

$this->getUser()->setAttribute(\'PayPalTransaction.         


        
3条回答
  •  既然无缘
    2021-02-10 06:37

    Another way if you want to remove just one session variable not all of them is to use the following code

    $this->getUser()->getAttributeHolder()->remove('att_name');
    

    Again this will only remove one not all ... to clear all use the previous code by Grad

提交回复
热议问题