- Issue created by @JeremySkinner
- Status changed to Closed: duplicate
9 months ago 9:33am 13 February 2024 - 🇬🇧United Kingdom JeremySkinner
Closing as I hadn't realised you'd already merged my fix! Thanks
This is a follow up to the comment I raised in #3371850. The fix that was merged for this issue introduces some additional problems.
#3371850 introduced a fix for a change in behaviour in Drupal Core which caused a fatal error in account creation. The fix that was merged checks isAuthenticated
instead of the previous isAnonymous
. However, this is not semantically the same, and breaks compatibility with modules that may swap out the implementation of isAuthenticated
.
For example, the decoupled_auth module allows the concept of users without logins (eg for CRM systems where a user record may exist for CRM purposes, but not have a login attached to it), to do this it switches out the logic of isAuthenticated
.
The previously merged fix means that the decoupled_auth module no longer works with profile as these users can't have profiles attached to them.
Rather than checking isAuthenticated
I'd recommend checking isAnonymous
but also check isNew
as well. This has semantically the same meaning as the original code prior to the fix, and works correctly with Core's change, but without assuming the meaning of isAuthenticated.
Closed: duplicate
1.0
Code
Closing as I hadn't realised you'd already merged my fix! Thanks