Thankyou for your reply
Here is the sequence of events, with the user's logging in and out at the end, as you suggested,
User A registers
User A logs in
User A shares plan
User A logs out
User B receives email
User B clicks on link from email
User B is taken to the registration page. At the top of the registration page is the name of the subscription plan that User A is subscribed to and a message 'This is a shared subscription from xxx. If you do not want to accept this shared subscription click here to reject it. '
User B registers (with the email address to which the email was sent)
User B logs in
The share is listed on User B's account page, but I can see from the back end that User A has been assigned to the relevant group and User B has not been assigned to the relevant group
I'm not sure which user you meant when you said 'Does logging out and back in trigger the user group assignment for that user?'
So I did both.
User B logs out
User A logs in
User A logs out
User B logs in
As above, the share is listed on User B's account page, but I can see from the back end that User B has not been assigned to the relevant group.
Thanks