Skip to content

Commit

Permalink
Merge pull request CESNET#3268 from zlamalp/fix
Browse files Browse the repository at this point in the history
CLI: Fixed changePassword() method param name
  • Loading branch information
zlamalp committed Jun 25, 2021
1 parent c8d71eb commit 31b4c2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions perun-cli/changePassword
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ chomp($newpasswd);
unless (defined $newpasswd) { die "\nERROR: newpassword cannot be empty \n";}

if (defined $userId) {
$usersAgent->changePassword( user => $userId, loginNamespace => $namespace, oldPassword => $oldpasswd, newPassword => $newpasswd, checkOldPassword => 1);
$usersAgent->changePassword( user => $userId, namespace => $namespace, oldPassword => $oldpasswd, newPassword => $newpasswd, checkOldPassword => 1);
printMessage("\nPassword of user $userId successfully changed", $batch);
} else {
$usersAgent->changePassword( login => $login, loginNamespace => $namespace, oldPassword => $oldpasswd, newPassword => $newpasswd, checkOldPassword => 1);
$usersAgent->changePassword( login => $login, namespace => $namespace, oldPassword => $oldpasswd, newPassword => $newpasswd, checkOldPassword => 1);
printMessage("\nPassword of user $login successfully changed", $batch);
}

4 changes: 2 additions & 2 deletions perun-cli/resetPassword
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ chomp($newpasswd);
unless (defined $newpasswd) { die "\nERROR: newpassword cannot be empty \n";}

if (defined $userId) {
$usersAgent->changePassword( user => $userId, loginNamespace => $namespace, oldPassword => 'null', newPassword => $newpasswd, checkOldPassword => 0);
$usersAgent->changePassword( user => $userId, namespace => $namespace, oldPassword => 'null', newPassword => $newpasswd, checkOldPassword => 0);
printMessage("\nPassword of user $userId successfully reset", $batch);
} else {
$usersAgent->changePassword( login => $login, loginNamespace => $namespace, oldPassword => 'null', newPassword => $newpasswd, checkOldPassword => 0);
$usersAgent->changePassword( login => $login, namespace => $namespace, oldPassword => 'null', newPassword => $newpasswd, checkOldPassword => 0);
printMessage("\nPassword of user $login successfully reset", $batch);
}

0 comments on commit 31b4c2e

Please sign in to comment.