Problem/Motivation

While evaluating the module I noticed I could not map SAML attributes to fields of type "Text (plain, long)". They didn't show up in the list of user fields. I'm working with a SP that has an attribute with quite a bit of text information that requires this field type.

Steps to reproduce

  1. Setup main module
  2. Add a user field of type "Text (plain, long)"
  3. Enable "SAML Auth User Fields Mapping" module
  4. Add a new user field attribute mapping
  5. The user field dropdown doesn't list any fields of type "Text (plain, long)"

Proposed resolution

Add support for "Text (plain, long)" field types.

Comments

PCate created an issue. See original summary.

  • roderik committed ff4134a on 8.x-3.x
    #3204065: support Text (plain, long) fields for attribute mapping.
roderik’s picture

Oh!

Sure, can do :-) Thanks for reporting that oversight.

See the -dev version (in a few minutes). I admit to pushing this change without having tested this myself.

roderik’s picture

Status: Active » Needs review
pcate’s picture

@roderik I tested the latest dev version and the "Text (plain, long)" fields were now available for mapping.

When I submitted the form it did show the following error on the /admin/config/people/saml/user-fields page:

Warning: Invalid argument supplied for foreach() in Drupal\samlauth_user_fields\Form\SamlauthMappingEditForm->validateForm() (line 176 of REDACTED/docroot/modules/contrib/samlauth/modules/samlauth_user_fields/src/Form/SamlauthMappingEditForm.php)

but I'm not sure if it's related to this change or not. When mapping the field I left the "Link user?" option blank.

  • roderik committed 4d68e91 on 8.x-3.x
    #3204065 by PCate, roderik: fix warning in field mappings screen.
roderik’s picture

Status: Needs review » Fixed

Thanks for testing. That (inconsequential) warning is an oversight: it only happens the very first time a mapping field is saved. Fixed now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.