Révision dbb0c974
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/sites/all/modules/commerce/modules/order/commerce_order.module | ||
---|---|---|
1398 | 1398 |
// We also limit the username to the maximum length for usernames. |
1399 | 1399 |
// @see user_validate_name() |
1400 | 1400 |
$username = preg_replace('/[^\x{80}-\x{F7} a-z0-9@_.\'-]/i', '-', trim($order->mail)); |
1401 |
// Remove the e-mail host name so usernames are not valid email adresses. |
|
1402 |
// Since usernames are considered public information in Drupal, we must |
|
1403 |
// not leak e-mail adresses through usernames. |
|
1404 |
$username = preg_replace('/@.*$/', '', $username); |
|
1401 | 1405 |
$username = substr($username, 0, USERNAME_MAX_LENGTH); |
1402 | 1406 |
return commerce_order_unique_username($username); |
1403 | 1407 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules