The relationship variables are missing.

In the example, a variable named "relationship" is used, but not created. On the line above, another variable "userRelationship" is created but not used.

I'm assuming this is a typo, and they are supposed to be the same?

Same thing with the second example.

They should probably also be named more coherently?