I need some help for the drupal commerce kickstart online shop i'm creating.
I had to import clients from an old database and I used some scripts to do so. Everything works well with the users and even with the user profiles (addresses for commerce) but whenever Drupal is trying to display the username it shows nothing.
You can see on this capture that the admin user list correctly displays the users registered with the website but that the username stays blank for imported users.
The same occurs anywhere drupal wants to display the username.
However, when I edit users from the admin section, the username field is not empty.
Here is the code I use,
$user = new stdClass();
$email = strtolower($row['email']);
$user->name = $email;
$user->mail = $email;
$user->init = $email;
$user->access = time();
$user->login = time();
$user->pass = user_hash_password($row['pwd']);
//$user->timezone = 'Europe/Paris';
//$user->language = 'fr';
$user->status = 1;
$user->roles = array('2' => 'authenticated user');
$user->field_observations['und']['value'] = $row['observations'];
$user->field_observations['und']['format'] = 'full_html';
$user->date['mimemail_textonly'] = 0;
Except for this username issue, everything works great, users are created and all the fields are correctly filled.
Does anyone have an explanation for that ? I thank you in advance for your help. Ask if you need more informations in order to help me.