X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapiusershow.php;h=28993102c0065085def40ecdeae7297a7746efdc;hb=f2d6e1e375410bee0efc90c80b1e74699a4c6b7d;hp=b3a939b431b2ab2427d1637d6f90d8df7160f4bd;hpb=384a50a7800abde62e040ea57872dc06c0519047;p=quix0rs-gnu-social.git diff --git a/actions/apiusershow.php b/actions/apiusershow.php index b3a939b431..28993102c0 100644 --- a/actions/apiusershow.php +++ b/actions/apiusershow.php @@ -34,7 +34,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/api.php'; +require_once INSTALLDIR . '/lib/apiprivateauth.php'; /** * Ouputs information for a user, specified by ID or screen name. @@ -50,7 +50,7 @@ require_once INSTALLDIR . '/lib/api.php'; * @link http://status.net/ */ -class ApiUserShowAction extends ApiAction +class ApiUserShowAction extends ApiPrivateAuthAction { /** * Take arguments for running @@ -98,7 +98,7 @@ class ApiUserShowAction extends ApiAction } if (!in_array($this->format, array('xml', 'json'))) { - $this->clientError(_('API method not found!'), $code = 404); + $this->clientError(_('API method not found.'), $code = 404); return; } @@ -113,7 +113,7 @@ class ApiUserShowAction extends ApiAction if ($this->format == 'xml') { $this->initDocument('xml'); - $this->showTwitterXmlUser($twitter_user); + $this->showTwitterXmlUser($twitter_user, 'user', true); $this->endDocument('xml'); } elseif ($this->format == 'json') { $this->initDocument('json'); @@ -123,4 +123,19 @@ class ApiUserShowAction extends ApiAction } + /** + * Return true if read only. + * + * MAY override + * + * @param array $args other arguments + * + * @return boolean is read only action? + */ + + function isReadOnly($args) + { + return true; + } + }