1. dolmenhir
  2. General
  3. Tuesday, December 06 2016, 12:05 PM
Hi,

I have a lot of users to import using the import plugin.
My csv file don't have "password" column nor "username" column.
That works but...

Passwords :
My passwords settings are :
- length : 12 characters
- 1 number at least
- 1 symbol at least
- 1 letter at least

But when I import the csv file, the generated passwords are :
- limited to 8 characters
- sometimes without number
- always without symbol

Username
Could you tell me if generated usernames will always be unique ?

Regards,

Dol.
Accepted Answer
admin Accepted Answer
Admin
Hi,
Password
Sorry it is so, we use Joomla function JUserHelper::genRandomPassword() to generate password. You can only change length of password by replace in file /plugins/jsn/userimport/userimport.php at line 283 this:
JUserHelper::genRandomPassword();
with this:
JUserHelper::genRandomPassword(12);
docs about this Joomla function at https://api.joomla.org/cms-3/classes/JUserHelper.html#method_genRandomPassword

Of course you can change generate password algorithm with a custom code.

My passwords settings are : ...
These settings are valid only when user fill password manually.

Username
Username is generated from name of user with this way:
1. converted into string URL safe string
2. add a postfix "_"+a random number between 1 and 2000

So your question: "Could you tell me if generated usernames will always be unique ?"
No, but it is highly unlikely to have duplicate. Duplicate comes only if you have duplicated names and too much bad luck.
  1. more than a month ago
  2. General
  3. # Permalink
dolmenhir Accepted Answer
Content Protected
  1. more than a month ago
  2. General
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.