Needs work
Project:
SAML Authentication
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2019 at 14:40 UTC
Updated:
18 Apr 2021 at 13:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
interx commentedComment #3
interx commentedNow with the correct patch ...
Comment #4
interx commentedComment #5
okin commentedI modified the patch because the previous one assumes that account mail is the account name and commented the code in the hook.
Comment #6
interx commentedThanks for the fix! I think you accidentally commented the api hook in your patch.
I added a new patch that removes this and the interdiff that shows what has changed in your patch.
Comment #7
roderikI'm taking over maintenance for the D7 version. Sorry that it took so long. Are you still around?
I like the patch but still have some comments - partly inspired by reviewing #3046871: Basic role assignment before typing this.
Also, I'll likely insert comments to the effect of the old samlauth_new_user_alter hook being old - and able to completely be replaced by samlauth_synchronize_saml_data_alter invocations.
Objects don't need a &, they are always already 'passed by reference' / not copied, so modifying always modifies the original object.
2 definitions in the api.php too.
Do we need to copy the added hunk
belowabove that last line too? (You did it for the samlauth_set_roles_from_saml() call in #3046871, which I agree with.)I guess "above" if we realize that exceptions thrown in the alter hook result in dened login.
Added to that:
if ($is_new || variable_get('samlauth_login_sync', FALSE)) {)