Hello,

I try to customize the sfGuardUser model, therefore I added
sfGuardUserProfile to my schema.yml and built/executed model and sql
for it.

here's the problem:
$this->getUser()->getProfile()->getFirstName(); throws the following
error:
Unknown method sfGuardUser::getProfile

my configuration:

schema.yml
...
sfGuardUserProfile:
  connection: xyz
  columns:
    id:
      type: integer(4)
      primary: true
      autoincrement: true
    userid:
      type: integer(4)
    first_name:  varchar(20)
    last_name:   varchar(20)
    birthday:    date
  relations:
    sfGuardUser:
      foreignAlias: sfGuardUserProfile
      local: userid
      foreign: id
      foreignType: one


myUser extends:
class myUser extends sfGuardSecurityUser {
}

echo get_class($this->getUser());
>> myUser

echo get_parent_class($this->getUser());
>> sfGuardSecurityUser

I also added
  sf_guard_plugin:
    profile_class:      sfGuardUserProfile
    profile_field_name: user_id
to my app.yml

any ideas?
thx a lot


--

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


Reply via email to