ENDOFHELP;
-require_once INSTALLDIR.'/scripts/commandline.inc';
+require_once INSTALLDIR.'/scripts/commandline.inc.php';
if (have_option('n')) {
$nickname = get_option_value('n');
*/
function twitterAuthForUser(User $user)
{
- $flink = Foreign_link::getByUserID($user->id,
- TWITTER_SERVICE);
- if (!$flink) {
- throw new ServerException("No Twitter config for this user.");
- }
-
+ $flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE);
$token = TwitterOAuthClient::unpackToken($flink->credentials);
if (!$token) {
throw new ServerException("No Twitter OAuth credentials for this user.");
}
}
} else {
- $user = User::staticGet('nickname', $nickname);
+ $user = User::getKV('nickname', $nickname);
$users = array($user->id);
}
$output = array();
foreach ($users as $id) {
- $user = User::staticGet('id', $id);
+ $user = User::getKV('id', $id);
if (!$user) {
throw new Exception("No user for id $id");
}