1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- defined('GNUSOCIAL') || die();
- class UserbyidAction extends ShowstreamAction
- {
- protected function doPreparation()
- {
-
- $this->target = Profile::getByID($this->trimmed('id'));
-
-
- if ($this->target->isLocal()) {
-
-
-
-
- $page_prefs = 'text/html,application/xhtml+xml,application/rdf+xml,application/xml;q=0.3,text/xml;q=0.2';
- $httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : null;
- $type = common_negotiate_type(
- common_accept_to_prefs($httpaccept),
- common_accept_to_prefs($page_prefs)
- );
- $page = ($type === 'application/rdf+xml') ? 'foaf' : 'showstream';
- $url = common_local_url($page, ['nickname' => $this->target->getNickname()]);
- common_redirect($url, 303);
- }
- }
- }
|