original_string: public function actionPassword($user, $password)
      {
          $user = $this->getUser($user);
          $user->applyForNewPassword();
          $result = $user->resetPassword($password, $user->getPasswordResetToken());
          if ($result) {
              echo "Password changed.\n";
          } else {
              echo "Password not changed.\n";
          }
          return static::EXIT_CODE_NORMAL;
      }
code: public function actionPassword($user, $password)
      {
          $user = $this->getUser($user);
          $user->applyForNewPassword();
          $result = $user->resetPassword($password, $user->getPasswordResetToken());
          if ($result) {
              echo "Password changed.\n";
          } else {
              echo "Password not changed.\n";
          }
          return static::EXIT_CODE_NORMAL;
      }
code_tokens: public function actionPassword ( $ user , $ password ) { $ user = $ this -> getUser ( $ user ) ; $ user -> applyForNewPassword ( ) ; $ result = $ user -> resetPassword ( $ password , $ user -> getPasswordResetToken ( ) ) ; if ( $ result ) { echo "Password changed.\n" ; } else { echo "Password not changed.\n" ; } return static :: EXIT_CODE_NORMAL ; }
docstring: Change password directly.
  @param User|string|integer $user User ID.
  @param string $password Password.
  @return int
docstring_tokens: Change password directly .