I tried to create user in Drupal8 using entity_create. The user is created just fine, but I can't login with the password unless I change it from the admin page.
$authData['name'] = 'testuser'; $authData['pass'] = 'testpass'; $authData['mail'] = 'firstname.lastname@example.org'; $authData['status'] = 1; $account = entity_create('user', $authData);
I also tried, the following code (obtained from drush)
$account->pass = 'testpass'; $account->save();
none of above works.