Question

I integrate FpOpenIdBundle according to this page

When I login program shows this error.

An exception occurred while executing 'SELECT t0.identity AS identity1, t0.attributes AS 
attributes2, t0.id AS id3, t0.user_id AS user_id4, t5.username AS username6, t5.username_canonical AS username_canonical7, t5.email AS email8, t5.email_canonical AS email_canonical9, t5.enabled AS 
enabled10, t5.salt AS salt11, t5.password AS password12, t5.last_login AS last_login13, t5.locked AS locked14, ~~ FROM openid_identities t0 LEFT JOIN fos_user t5 ON t0.user_id = t5.id WHERE t0.identity = ? LIMIT 1' with params ["https:\/\/www.google.com\/accounts\/o8\/id?
id=AItOawlarY4c2Vz2TpzqTvEtNKgXgGmVQLYSadU"]: 
SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.identity' in 'field list'

I guess it might be there is no 'identity' field in my openid_identities class.

but samples at that page has only $id and $user.

class OpenIdIdentity extends BaseUserIdentity
{
/**
 * @var integer
 *
 * @ORM\Id
 * @ORM\Column(type="integer")
 * @ORM\GeneratedValue(strategy="AUTO")
 */
protected $id;

/**
  * The relation is made eager by purpose. 
  * More info here: {@link https://github.com/formapro/FpOpenIdBundle/issues/54}
  * 
  * @var Symfony\Component\Security\Core\User\UserInterface
  *
  * @ORM\ManyToOne(targetEntity="Acme\DemoBundle\Entity\User", fetch="EAGER")
  * @ORM\JoinColumns({
  *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  * })
  */
protected $user;

I guess I should add $identity and $attributes though,,

is it correct?

If you are using FpOpenId.

please let me know your OpenIdIdentity class.

Was it helpful?

Solution

I think this is the database issue ,Can you try this command in command line /Console.

php app/console doctrine:schema:update --force

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top