]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/deleteuser.php
Fix for regression introduced with my last update to the
[quix0rs-gnu-social.git] / scripts / deleteuser.php
old mode 100644 (file)
new mode 100755 (executable)
index 67aea79..5373c73
@@ -21,7 +21,7 @@
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
 
 $shortoptions = 'i::n::y';
-$longoptions = array('id::nickname::yes');
+$longoptions = array('id=', 'nickname=', 'yes');
 
 $helptext = <<<END_OF_DELETEUSER_HELP
 deleteuser.php [options]
@@ -57,7 +57,7 @@ if (have_option('i', 'id')) {
 if (!have_option('y', 'yes')) {
     print "About to PERMANENTLY delete user '{$user->nickname}' ({$user->id}). Are you sure? [y/N] ";
     $response = fgets(STDIN);
-    if (strtolower($response) != 'y') {
+    if (strtolower(trim($response)) != 'y') {
         print "Aborting.\n";
         exit(0);
     }