Better function to clean generated logins
This commit is contained in:
parent
939c7c3283
commit
c6b2577707
@ -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));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user