aboutsummaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rwxr-xr-xcli/create-user.php2
-rwxr-xr-xcli/delete-user.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/cli/create-user.php b/cli/create-user.php
index 1da7f580d..c6364371a 100755
--- a/cli/create-user.php
+++ b/cli/create-user.php
@@ -10,7 +10,7 @@ if (!FreshRSS_user_Controller::checkUsername($username)) {
}
$usernames = listUsers();
-if (preg_grep("/^$username$/i", $usernames) !== false) {
+if (preg_grep("/^$username$/i", $usernames)) {
fail('FreshRSS warning: username already exists “' . $username . '”', EXIT_CODE_ALREADY_EXISTS);
}
diff --git a/cli/delete-user.php b/cli/delete-user.php
index 7b05cbe7a..fbbb2eebb 100755
--- a/cli/delete-user.php
+++ b/cli/delete-user.php
@@ -19,7 +19,7 @@ if (!FreshRSS_user_Controller::checkUsername($username)) {
}
$usernames = listUsers();
-if (preg_grep("/^$username$/i", $usernames) === false) {
+if (!preg_grep("/^$username$/i", $usernames)) {
fail('FreshRSS error: username not found “' . $username . '”');
}