do you mean somethig like this?

class myUser extends sfBasicSecurityUser
{
    protected $user = null;

    public function getCustomUser() {
        if (!$this->user && $id = $this->getAttribute('id', null,
'MyCustomUser')) {
            $this->user = MyCustomUserPeer::retrieveByPk($id);
        }
        return $this->user;
    }
}


On Oct 26, 11:57 pm, Frank Stelzer <d...@bleedingmoon.de> wrote:
> Yes ....
>
> "Add a method in your myUser class for retrieving an according and
> valid instance of your guard user entry and thats it (see  
> getGuardUser)."
>
> ...
>
> guard user is your custom user.
>
> Am 26.10.2009 um 23:55 schrieb lorenx:
>
>
>
>
>
> > mmm,
> > but i don't have any getCustomUser() method;
> > it seems that it should return a MyCustomUser instance...
>
> > On Oct 26, 11:45 pm, Frank Stelzer <d...@bleedingmoon.de> wrote:
> >> You do not have to re-implement those methods, as your model class  
> >> has
> >> it already done.
>
> >> You cann access them via:
>
> >> $this->getUser()->getCustomUser()->getEmail();
>
> >> or add wrapper methods in your myUser class:
>
> >> myUser:
> >> ---
> >> public function getEmail()
> >> {
> >>    return $this->getCustomUser()->getEmail();
>
> >> }
>
> >> - Frank
>
> >> Am 26.10.2009 um 23:41 schrieb lorenx:
>
> >>>> 3. Add a "getCustomUser" method to your myUser class and generate  
> >>>> the
> >>>> mentioned link in this way.
>
> >>> sorry but...
> >>> if i need a (custom) getUsername() or a getEmail() method, do i need
> >>> to re-implement these methods from scratch in myUser class  
> >>> although i
> >>> already have them in MyCustomUser class?
> >>> could i "link" somehow those methods to the ones generated in
> >>> MyCustomUser class? how?
>
> >>> sorry but it seems to me this could be the last step to partially
> >>> understand the process...
--~--~---------~--~----~------------~-------~--~----~
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