X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FNewPassword.php;h=003597472716c990e1fab7560623ddbf39060e74;hb=2fa6cc000013089d59d9cc221b544ed1a7a4cd37;hp=f5698ba716ff62b1cf0e3258c2155436ca208769;hpb=daf94a8f6320d633a2ba727b3d0e53c2b74d9246;p=friendica.git diff --git a/src/Core/Console/NewPassword.php b/src/Core/Console/NewPassword.php index f5698ba716..0035974727 100644 --- a/src/Core/Console/NewPassword.php +++ b/src/Core/Console/NewPassword.php @@ -58,12 +58,8 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - require_once '.htconfig.php'; - $result = \dba::connect($db_host, $db_user, $db_pass, $db_data); - unset($db_host, $db_user, $db_pass, $db_data); - - if (!$result) { - throw new \RuntimeException('Unable to connect to database'); + if ($a->isInstallMode()) { + throw new \RuntimeException('Database isn\'t ready or populated yet'); } $nick = $this->getArgument(0);