I’ve extended my user model using the instructions at https://learn.userfrosting.com/recipes/extending-the-user-model#extend-the-user-model. Everything seems fine but I had only been testing locally. Having deployed to a staging server, I realize it has broken the verification page - when I click on the verification link, I get a 500 error.
From the log it’s very clear what is wrong, but I’m not sure where to go in order to fix it:
- The query generated in the account sprinkle is correctly loading in the member table details, but the ‘where’ clause has just ‘id’ - and there are multiple ‘id’ columns in the query:
selectusers
.*,members
.email_consent
asemail_consent
,members
.tc_agree
astc_agree
,members
.auto_renew
asauto_renew
,members
.subscribed_until
assubscribed_until
,members
.city
ascity
,members
.country
ascountry
fromusers
left joinmembers
onmembers
.id
=users
.id
whereid
= 12345 andusers
.deleted_at
is null limit 1
This gives me “Message: SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘id’ in where clause is ambiguous”
Did I miss a key step? (I looked at the verify function in the AccountController.php file but couldn’t see an obvious fix).
Many thanks for any help!