0

I'm using Symfony1.4 on a website. We are recasting it under Laravel5. Both versions are currently online and share the same database. We are using sfDoctrineGuardPlugin.

We added an integer field in sf_guard_user. It works fine in Laravel but we can't access its value under Symfony1.4. (I know we are not supposed to use directly sf_guard_user, but we have to stick with it for now, as SF1.4 version is going offline in a few weeks).

We added the field to the schema.yml, and a getter in the model (sfGuardUser.class.php).

Is there anything else we need to do in order to access the value of the field ?

Didier Sampaolo
  • 2,566
  • 4
  • 24
  • 34

1 Answers1

0

Updating schema.yml should be enough, provided you also regenerate classes: ./symfony doctrine:build --all-classes

New field is not accessible directly on sfContext::getInstance->getUser(), but on returned guard user:

sfContext::getInstance->getUser()->getGuardUser()->getAdditionalField()
Marek
  • 7,337
  • 1
  • 22
  • 33