Skip to content
Snippets Groups Projects
Commit c6b25777 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Better function to clean generated logins

parent 939c7c32
No related branches found
No related tags found
No related merge requests found
......@@ -757,13 +757,10 @@ else
if ($_GET["action"] == 'create_user')
{
//$login=strtolower(substr(dol_string_unaccent($object->prenom), 0, 4)) . strtolower(substr(dol_string_unaccent($object->nom), 0, 4));
// Full firstname and name separated with a dot : firstname.name
// TODO add function
$login=strtolower(dol_string_unaccent($object->prenom)) .'.'. strtolower(dol_string_unaccent($object->nom));
$login=str_replace(' ','.',$login); // For particle names
$login=str_replace('\'','',$login); // For simple quote
$login=dol_string_nospecial($login,''); // For special names
// Create a form array
$formquestion=array(array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment