#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $shortoptions = 'i::n::u::y'; $longoptions = array('id=', 'nickname=', 'uri=', 'yes'); $helptext = <<getProfile(); } else if (have_option('u', 'uri')) { $uri = get_option_value('u', 'uri'); $oprofile = Ostatus_profile::getKV('uri', $uri); if (!$oprofile instanceof Ostatus_profile) { print "Can't find profile with URI '$uri'\n"; exit(1); } $profile = $oprofile->localProfile(); } else { print "You must provide either an ID, a URI or a nickname.\n"; exit(1); } if (!have_option('y', 'yes')) { print "About to PERMANENTLY delete profile '".$profile->getNickname()."' ({$profile->id}). Are you sure? [y/N] "; $response = fgets(STDIN); if (strtolower(trim($response)) != 'y') { print "Aborting.\n"; exit(0); } } print "Deleting..."; $profile->delete(); print "DONE.\n";