The module normally works fine but when a user's email is too long, the module will create the username from the wrong value.
Please see below error from my Drupal recently error log.
Drupal\Core\Entity\EntityStorageException:
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO "users_field_data" ("uid",
"langcode",
"preferred_langcode",
"preferred_admin_langcode",
"name",
"pass",
"mail",
"timezone",
"status",
"created",
"changed",
"access",
"login",
"init",
"default_langcode") VALUES (:db_insert_placeholder_0,
:db_insert_placeholder_1,
:db_insert_placeholder_2,
:db_insert_placeholder_3,
:db_insert_placeholder_4,
:db_insert_placeholder_5,
:db_insert_placeholder_6,
:db_insert_placeholder_7,
:db_insert_placeholder_8,
:db_insert_placeholder_9,
:db_insert_placeholder_10,
:db_insert_placeholder_11,
:db_insert_placeholder_12,
:db_insert_placeholder_13,
:db_insert_placeholder_14); Array (
[:db_insert_placeholder_0] => 2627
[:db_insert_placeholder_1] => en
[:db_insert_placeholder_2] => en
[:db_insert_placeholder_3] =>
[:db_insert_placeholder_4] => simplesamlphp_auth_richard.roe-1234567890abc@darwin.nt.gov.au
[:db_insert_placeholder_5] =>
[:db_insert_placeholder_6] =>
[:db_insert_placeholder_7] =>
[:db_insert_placeholder_8] => 1
[:db_insert_placeholder_9] => *******
[:db_insert_placeholder_10] => *******
[:db_insert_placeholder_11] => 0
[:db_insert_placeholder_12] => 0
[:db_insert_placeholder_13] => simplesamlphp_auth_richard.roe-1234567890abc@darwin.nt.gov.au
[:db_insert_placeholder_14] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 811 of /code/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
For example, from below example user data, Drupal will create the user successfully from the username field "richard.roe" and everyone works fine.
E-Mail-Address richard.roeabc@darwin.nt.gov.au
username richard.roe
However, when a user username is too long, Drupal won't use the username field value instead it will use the combination of "simplesamlphp_auth" + email address field value as it's Drupal username and make the value is too long to put in the database.
E-Mail-Address richard.roe-1234567890abc@darwin.nt.gov.au
username richard.roe123456789
Active
3.2
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.