diff --git a/lib/Alchemy/Phrasea/Command/User/UserPasswordCommand.php b/lib/Alchemy/Phrasea/Command/User/UserPasswordCommand.php
index 9e282966b1..bd87c4d885 100644
--- a/lib/Alchemy/Phrasea/Command/User/UserPasswordCommand.php
+++ b/lib/Alchemy/Phrasea/Command/User/UserPasswordCommand.php
@@ -123,11 +123,17 @@ class UserPasswordCommand extends Command
if (($password || $generate || $getHash) && $oldHash) {
if ($jsonformat) {
- $hash['password_hash'] = $oldHash;
- $hash['nonce'] = $oldNonce;
+ if ($password) {
+ $hash['new_password'] = $password;
+ }
+ $hash['password_hash'] = $oldHash;
+ $hash['nonce'] = $oldNonce;
echo json_encode($hash);
} else {
+ if ($password) {
+ $output->writeln('new_password :' . $password);
+ }
$output->writeln('password_hash :' . $oldHash);
$output->writeln('nonce :' . $oldNonce);
}