X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fcommand.php;h=256743f5353bc43ff2c3a4c33957bd432d389223;hb=cd7cd0ead48ddb8d64044d15d45a68ffbe3471cf;hp=7b1d651e48956844fee0680a6ac2adca01d6df12;hpb=01a03e34c8d286011c0f4301e60c103d992a449a;p=quix0rs-gnu-social.git diff --git a/scripts/command.php b/scripts/command.php index 7b1d651e48..256743f535 100755 --- a/scripts/command.php +++ b/scripts/command.php @@ -51,21 +51,22 @@ function interpretCommand($user, $body) if (have_option('i', 'id')) { $id = get_option_value('i', 'id'); - $user = User::staticGet('id', $id); + $user = User::getKV('id', $id); if (empty($user)) { print "Can't find user with ID $id\n"; exit(1); } } else if (have_option('n', 'nickname')) { $nickname = get_option_value('n', 'nickname'); - $user = User::staticGet('nickname', $nickname); + $user = User::getKV('nickname', $nickname); if (empty($user)) { print "Can't find user with nickname '$nickname'\n"; exit(1); } } else if (have_option('o', 'owner')) { - $user = User::siteOwner(); - if (empty($user)) { + try { + $user = User::siteOwner(); + } catch (ServerException $e) { print "Site has no owner.\n"; exit(1); }