I've been doing some testing with Bakery and found that in some situations where the user details aren't updated when they login. I'm using the transmit/receive hooks to add and retrieve roles from the master site to the slave site, but the slave site never receives updates to changes in the user profile.
I have modified the module in two ways.
1) I have updated the _bakery_bake_chocolatechip_cookie() function to accept an additional (optional) parameter of the current user object. This seemed like a better approach than modifying large blocks of code. If the _bakery_bake_chocolatechip_cookie() function finds the user account then it invokes the 'bakery_transmit' hook and adds the output to the 'chocolatechip' cookie information.
2) The login request on the slave site has been modified slightly to include a couple of extra calls to the 'bakery_receive' hook in order to accept the incoming 'chocolatechip' cookie data.
If needed I can also provide the hooks that I'm using to sync user accounts from one site to the other.
I'm not entirely certain that this is the best approach here. If that's the case then please let me know as I'm keen to get this working correctly. That said, we have been testing this for the last couple of days and not seen any issues.
N/A.
None. I have modified the _bakery_bake_chocolatechip_cookie() function, but left the rest of the code intact so it acts in the same way.
None.
N/A.
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.