. * * @category Plugin * @package GNUsocial * @author Daniel Supernault * @author Diogo Cordeiro * @copyright 2015 Free Software Foundaction, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link https://gnu.io/social */ if (!defined('GNUSOCIAL')) { exit(1); } class apActorProfileAction extends ManagedAction { protected $needLogin = false; protected $canPost = true; protected function handle() { $nickname = $this->trimmed('nickname'); try { $user = User::getByNickname($nickname); $profile = $user->getProfile(); } catch (Exception $e) { ActivityPubReturn::error ('Invalid username', 404); } $res = Activitypub_profile::profileToObject($profile); ActivityPubReturn::answer ($res); } }