From 756c3c05a140fe4f1fcd2c6d3a78f57f34e2a63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= Date: Wed, 23 May 2018 22:21:17 -0300 Subject: [PATCH] Translit names' special characters (#73) When nickname is generated from a full name, intent to translit them to ascii instead of stripping special characters. --- includes/openid-connect-generic-client-wrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/openid-connect-generic-client-wrapper.php b/includes/openid-connect-generic-client-wrapper.php index 57ee585..9316e40 100644 --- a/includes/openid-connect-generic-client-wrapper.php +++ b/includes/openid-connect-generic-client-wrapper.php @@ -503,7 +503,7 @@ class OpenID_Connect_Generic_Client_Wrapper { } // normalize the data a bit - $desired_username = strtolower( preg_replace( '/[^a-zA-Z\_0-9]/', '', $desired_username ) ); + $desired_username = strtolower( preg_replace( '/[^a-zA-Z\_0-9]/', '', iconv( 'UTF-8', 'ASCII//TRANSLIT', $desired_username ) ) ); // copy the username for incrementing $username = $desired_username;