Support from Acquia helps fund testing for Drupal Acquia logo

Comments

richburke’s picture

Title: SSO authenticated admin users cannot create other users » SimpleSAML authenticated admin users cannot create other users
richburke’s picture

The attached patch addresses the issue detailed above.

m.abdulqader’s picture

I have the same bug I will try the patch and let you now

m.abdulqader’s picture

OK the patch works for me. Thank you.

tbsiqueira’s picture

Status: Active » Reviewed & tested by the community

I've tested this patch and it works very well, the code is precise and clean. Thank you "richburke" for your patch. This is ready to commited!

snufkin’s picture

Hey, which version have you tested this against? 2.x?

chrisgross’s picture

For some reason, git apply simplesamlphp_auth-admin-users-cannot-other-users-9291915-1.patch does not work for me, but patch -p1 < simplesamlphp_auth-admin-users-cannot-other-users-9291915-1.patch does. I am going to test this out, and if it works, I will try re-roll the patch in a way that works with git apply. Due to the other active branches that are newer, I assume this is not going to get committed to an alpha branch anytime soon. If I'm wrong, please commit it.

chrisgross’s picture

Re-rolled the patch. This successfully applies against alpha2 and works perfectly.

chgasparoto’s picture

I think the solution is simpler, because we need to compare on line 361 and not assign the $category variable.

Please review.

Thanks.

P.s.: I attached a version of the patch with early return approach. For me, is more readable.

chgasparoto’s picture

Status: Reviewed & tested by the community » Needs review
vmachado’s picture

The uploaded patch #8 has an issue when creating a new user during user first login. The user is created with success however it's email isn't set correctly. The same issue continues happening in patch #9, since it didn't fix this issue.

I'm uploading a new patch combining the correction from #8 and #9 and fixing all issues.

bkosborne’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev
Priority: Normal » Critical
FileSize
3.62 KB

Wow, what a big, awful, bug. The method taken here to set the username and email address on users during hook_user_insert makes no sense. It should be done during hook_user_login or somewhere else.

Anyway, patches should be made against the dev branch, which I what I did here. I also cleaned it up further.

bkosborne’s picture

Found a small bug in this, where the $_simplesamlphp_auth_as is not always defined in hook_user_insert. Fixed.

xs2bharat’s picture

I am still having same issue that newly created user have email and name from signed in user after apply patch # 13

sguglielmo’s picture

Tested #11 against 7.x-2.0-alpha2: Working well so far!

+1 RTBC

laryn’s picture

I took the patch from #11 and manually worked it into a PR for the Backdrop version of this module and can confirm that the basic logic works well.