function drush_user_password

8.0.x drush_user_password($inputs)
6.x drush_user_password($name)
7.x drush_user_password($inputs)
4.x drush_user_password($name)
5.x drush_user_password($name)
master drush_user_password($inputs)

Sets the password for the account with the given username


commands/user/, line 354
Drush User Management commands


function drush_user_password($inputs) {
  $userlist = new UserList($inputs);
  if (!drush_get_context('DRUSH_SIMULATE')) {
    $pass = drush_get_option('password');
    // If no password has been provided, prompt for one.
    if (empty($pass)) {
      $pass = drush_prompt(dt('Password'), NULL, TRUE, TRUE);
    foreach ($userlist->accounts as $account) {
      $userlist->each('password', array($pass));
    drush_log(dt('Changed password for !users', array('!users' => $userlist->names())), LogLevel::SUCCESS);