X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FConsole%2FUser.php;h=1c1d26b0a9d773bffeab5d6a800a844e012301f7;hb=4c39faca95e6f8510c9ee9cbf7957855bc718ec7;hp=383a77f70ebc805ae80d4fc2aa6891aab140af4b;hpb=ac4f62f55698b2851169b0ac0bfa7c9616222dfe;p=friendica.git diff --git a/src/Console/User.php b/src/Console/User.php index 383a77f70e..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')); } @@ -206,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.')); } @@ -425,7 +425,7 @@ HELP; return false; } - if ($user) { + if (!empty($user)) { $table->addRow($user); } $this->out($table->getTable());