X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FConsole%2FUser.php;h=1c1d26b0a9d773bffeab5d6a800a844e012301f7;hb=7dadc7f6dc0b1e68bfa5937b3a3fa3fd9cdcacd1;hp=dd12d7971cc61fa7c8b96658d6d170d0776c5acc;hpb=19a86fd8f293acbe770f1a4ddcd753b170cd6a40;p=friendica.git diff --git a/src/Console/User.php b/src/Console/User.php index dd12d7971c..1c1d26b0a9 100644 --- a/src/Console/User.php +++ b/src/Console/User.php @@ -1,6 +1,6 @@ getNick($arg_index); $user = UserModel::getByNickname($nick, ['uid']); - if (!$user) { + if (empty($user)) { throw new RuntimeException($this->l10n->t('User not found')); } @@ -207,7 +206,7 @@ HELP; try { $result = UserModel::updatePassword($user['uid'], $password); - if (!$result) { + if (empty($result)) { throw new \Exception($this->l10n->t('Password update failed. Please try again.')); } @@ -426,7 +425,7 @@ HELP; return false; } - if ($user) { + if (!empty($user)) { $table->addRow($user); } $this->out($table->getTable());