It is a solution of this problem :)

In your Entity "User" use this methods (serialize, unserialize)


class User implements UserInterface, \Serializable {

....
    public function serialize()
    {
      return serialize(
           array(
                $this->getUsername()
           )
      );
    }

    public function unserialize($serialized)
    {

      $arr = unserialize($serialized);
      $this->setUsername($arr[0]);
    } 
....
}



________________________________
De : Juan Ases García <a...@atzeneta.es>
À : Symfony users <symfony-users@googlegroups.com>
Envoyé le : Jeudi 5 Mai 2011 18h39
Objet : Re: Tr : [symfony-users] [sf2] Access to current route

I have a similar problem in the implementation of a user provider.

The only solution I found is this hack.

Do you know any more right solution?

On Apr 27, 5:34 pm, A A <kaupa...@gmail.com> wrote:
> "@" seems to be a kludge :)
>
> 2011/4/27 Louardi Abdeltif <louardi.abdel...@yahoo.fr>
>
>
>
>
>
>
>
>
>
> > I corrected the problem, I modified line 136 (file : *
> > SITE_PATH/vendor/symfony/src/Symfony/Component/Security/Core/Authentication 
> > /Token/AbstractToken.php
> > *)
>
> > BEFORE:
> > return serialize(array($this->user, $this->authenticated, $this->roles,
> > $this->attributes));
>
> > AFTER:
> > return @serialize(array($this->user, $this->authenticated, $this->roles,
> > $this->attributes));
>
> > ----- Mail transféré -----
> > *De :* Louardi Abdeltif <louardi.abdel...@yahoo.fr>
> > *À :* "symfony-users@googlegroups.com" <symfony-users@googlegroups.com>
> > *Envoyé le :* Mercredi 27 Avril 2011 7h48
> > *Objet :* Re : [symfony-users] [sf2] Access to current route
>
> > I have a notice with this new beta. when i use the prod environement i
> > haven't this notice.
>
> > *Notice*: serialize() 
> > [function.serialize<http://taskmgr.lan/app_dev.php/function.serialize>]:
> > "id" returned as member variable from __sleep() but does not exist in *
> > SITE_PATH/vendor/symfony/src/Symfony/Component/Security/Core/Authentication 
> > /Token/AbstractToken.php
> > * on line *136*
>
> > *Notice*: serialize() 
> > [function.serialize<http://taskmgr.lan/app_dev.php/function.serialize>]:
> > "name" returned as member variable from __sleep() but does not exist in *
> > SITE_PATH**
> > /vendor/symfony/src/Symfony/Component/Security/Core/Authentication/Token/Ab 
> > stractToken.php
> > * on line *136*
>
> > *Notice*: serialize() 
> > [function.serialize<http://taskmgr.lan/app_dev.php/function.serialize>]:
> > "members" returned as member variable from __sleep() but does not exist in
> > *SITE_PATH/**
> > vendor/symfony/src/Symfony/Component/Security/Core/Authentication/Token/Abs 
> > tractToken.php
> > * on line *136*
>
> >  --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> С уважением,
>     Александр Каупанин.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to