- Issue created by @mingsong
- π¦πΊAustralia mingsong π¦πΊ
After debugging, I identify where this issue comes from.
The user name and email address are set at line 136 in saml_sp_drupal_login.module
https://git.drupalcode.org/project/saml_sp/-/blob/4.2.1/modules/saml_sp_...
Don't know why the name id return from my idp is not the user email address yet.
And there is another issue at line 138 in saml_sp_drupal_login.module
https://git.drupalcode.org/project/saml_sp/-/blob/4.2.1/modules/saml_sp_...
At the line above, the first element in the $mail_keys array is 'mail', but the attributes return from my idp are
Array ( [email] => Array ( [0] => user2@example.com ) )
in which, the array key is 'email' rather than 'mail'. So at the end, the $emails array couldn't catch the user email address. The debug info of $emails array is
Array ( [0] => _9c750031e5b0622120c8426aed671f76521e0a7793 )
in which, the first 'mail' address is the name id from my idp.
Hope those information help.
- First commit to issue fork.
- @jproctor opened merge request.
- Status changed to Needs review
over 1 year ago 4:47pm 7 June 2023 - πΊπΈUnited States jproctor
The typical attribute names for an IdP to send an email address are
mail
andurn:oid:0.9.2342.19200300.100.1.3
, butemail
makes enough sense that I think we can add it. - First commit to issue fork.
-
jrglasgow β
committed be10d789 on 4.x authored by
jproctor β
Issue #3352157: Email address and user name are not populated correctly
-
jrglasgow β
committed be10d789 on 4.x authored by
jproctor β
- Status changed to Fixed
over 1 year ago 5:16pm 7 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.