reli
1/17/2018 - 1:36 PM

user set password

user set password

<? 
$user = \Drupal\user\Entity\User::load($uid);
$user->setPassword('newpassword');
$user->save();



Method 2: Drush:

$ drush upwd 1 --password="newpassword"
Method 3: Drupal Console:

$ drupal user:password:reset