- First commit to issue fork.
- @jrearick opened merge request.
- Status changed to Needs review
almost 2 years ago 1:50pm 31 January 2023 - 🇺🇸United States jrearick Iowa
We're running into the same issue. Just to get things moving, I created a MR and attached a patch file. It's hard to test without a proper environment, so any help testing would be appreciated. I assume we'll want to add tests for this, but I suppose that can wait until we know this is the solution to go with.
- 🇨🇦Canada gocaps
We use a custom Unique Identifier field and so we were running into this issue, where the authname would update in the authmap table each time the user was edited. On next login attempts, Drupal would create a new user prefixed with "simplesamlphp_auth_" and log an error:
Error on synchronizing name attribute for uid 12345: an account with the username johndoe and uid 123 already exists.
Seems related to https://www.drupal.org/project/simplesamlphp_auth/issues/3347716 💬 Module is auto-creating users prefixed with "simplesamlphp_auth_" Active
Patch #4 is so far working.
- 🇮🇹Italy Giuseppe87
I'm facing the same bug updating simplesamlphp_auth on a existing project from 3.2 to 4.x-dev, and #4 works.
- 🇺🇸United States caesius
@Giuseppe87 could you confirm that you ran into this issue by updating from 3.2 to 4.x-dev without also updating the externalauth module? The original ticket description seems to indicate that this issue would come up after updating externalauth (since it introduces new behavior) regardless of the version of the simplesamlphp_auth module.
- 🇮🇹Italy Giuseppe87
@caesius you're right, I mixed the two modules responsibilities.
I've done the tests you asked:
- simplesamlphp_auth 3.2/3.3 with externalauth 1.4: no bug
- simplesamlphp_auth 4.x-dev with externalauth 1.4: no bug
- simplesamlphp_auth 4.x-dev with externalauth 2.0.3: bug happens
Therefore as you stated isn't something strictly due to 4.x-dev upgrade.
However, I'd point out that this issue could be implicitly linked to the 4.x.x release, for dependency reasons.
If 4.x.x is gonna the branch with D10 support, being 2.x.x the only branch with D10 support for externalauth, when upgrading core and thus contribute modules, everyone using simplesamlphp_auth will face this issue.
- Status changed to RTBC
about 1 year ago 10:51am 21 September 2023 - last update
about 1 year ago 21 pass - last update
about 1 year ago Composer require failure - 🇺🇸United States caesius
Re-ran the 3.x tests and it seems good now. 4.x failed due to the same Composer plugin error that 3.x originally ran into, but it's obviously not related to this patch.
-
Berdir →
committed aba9a9e4 on 4.x authored by
jrearick →
Issue #3332611 by jrearick: Saving a user overrides the authname
-
Berdir →
committed aba9a9e4 on 4.x authored by
jrearick →
-
Berdir →
committed feead597 on 8.x-3.x authored by
jrearick →
Issue #3332611 by jrearick: Saving a user overrides the authname
-
Berdir →
committed feead597 on 8.x-3.x authored by
jrearick →
- Status changed to Fixed
about 1 year ago 8:12pm 3 October 2023 - 🇨🇦Canada bbombachini London, ON
I know the issue has been resolved, hence closed. But is there any suggestions about how to fix the users that have already been affected?
- 🇮🇹Italy Giuseppe87
I don't know if there's a better way, but from the debug I did to identify this bug switching to 4.x.x, I suppose the following method method should work - please be aware you have to test it, I haven't actually tried it.
You have to update the table `authmap` for the the user whose external `authname` have been overriden with the local\Drupal one.
In my case, the external authname is a string like "00556409645g0050SJQww2" while the drupal one is an email, so I could query the table to list all the elements with an email as authname, and then manually update them.
You obviously need some way to find the external authnames for the broken records - e.g. a backup db.
Automatically closed - issue fixed for 2 weeks with no activity.