As far as I am aware $this->getUser() does not access your own class that
overrides sfBasicSecurityUser but is in fact an instance of
sfBasicSecurityUser. I stand to be corrected however.

On Mon, Dec 6, 2010 at 3:59 PM, Carlos <carlosb...@gmail.com> wrote:

> Hi,
>
> I added some methods to myUser class, and suddenly I can't access to
> them from the action.
> $this->getUser()->method returns a "Call to undefined method" error
> message. I really think it was working before... Maybe I modified any
> yml file?
>
> My myUser class and one of this methods:
>
> class myUser extends sfBasicSecurityUser
> {
>  const INFO_MESSAGE    = 'infoMessages';
>  const WARNING_MESSAGE = 'warnMessages';
>  const ERROR_MESSAGE   = 'errorMessages';
>
>  /**
>  * Adds messages to user flash
>  *
>  * @param string $msg
>  * @param string $level
>  */
>  public function addMessage($msg, $level = myUser::INFO_MESSAGE)
>  {
>    // Gets the existing array, returns an empty array otherwise.
>    $flashContent = $this->getFlash($level, array());
>
>    // If messages doesn't exists, it's loaded into flash.
>    if(!in_array($msg, $flashContent))
>    {
>      $flashContent[] = $msg;
>      $this->setFlash($level, $flashContent);
>    }
>  }
> ...
> }
>
> Thanks,
>
> Carlos
>
> --
> 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<symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
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