]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/backupuser.php
Add translator documentation.
[quix0rs-gnu-social.git] / scripts / backupuser.php
index 56a54810ca0bef412fb5ed8298b7ecd5f331ee60..ee2951fc8f146609dfb8cfdbcea071e96202666c 100644 (file)
@@ -34,33 +34,9 @@ END_OF_EXPORTACTIVITYSTREAM_HELP;
 
 require_once INSTALLDIR.'/scripts/commandline.inc';
 
-function getUser()
-{
-    $user = null;
-
-    if (have_option('i', 'id')) {
-        $id = get_option_value('i', 'id');
-        $user = User::staticGet('id', $id);
-        if (empty($user)) {
-            throw new Exception("Can't find user with id '$id'.");
-        }
-    } else if (have_option('n', 'nickname')) {
-        $nickname = get_option_value('n', 'nickname');
-        $user = User::staticGet('nickname', $nickname);
-        if (empty($user)) {
-            throw new Exception("Can't find user with nickname '$nickname'");
-        }
-    } else {
-        show_help();
-        exit(1);
-    }
-
-    return $user;
-}
-
 try {
     $user = getUser();
-    $actstr = new UserActivityStream($user);
+    $actstr = new UserActivityStream($user, true, UserActivityStream::OUTPUT_RAW);
     print $actstr->getString();
 } catch (Exception $e) {
     print $e->getMessage()."\n";