X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Faccountmover.php;h=83314b49978d53ace8a732179db05a33b5f4242f;hb=9a75778b299e6ca2903fb51c0765be4dcb4f42e6;hp=3e9228994a3f16315a72db96a3eef132e46bc233;hpb=7db24c32d6d627a9db84255ffbbbd3a52b491204;p=quix0rs-gnu-social.git diff --git a/lib/accountmover.php b/lib/accountmover.php index 3e9228994a..83314b4997 100644 --- a/lib/accountmover.php +++ b/lib/accountmover.php @@ -86,7 +86,7 @@ class AccountMover extends QueueHandler $qm = QueueManager::get(); foreach ($acts as $act) { - $qm->enqueue(array($act, $sink, $user->uri, $remote), 'actmove'); + $qm->enqueue(array($act, $sink, $user->getUri(), $remote), 'actmove'); } $this->log(LOG_INFO, @@ -109,18 +109,11 @@ class AccountMover extends QueueHandler $svcDocUrl = null; $username = null; - foreach ($xrd->links as $link) { - if ($link['rel'] == 'http://apinamespace.org/atom' && - $link['type'] == 'application/atomsvc+xml') { - $svcDocUrl = $link['href']; - if (!empty($link['property'])) { - foreach ($link['property'] as $property) { - if ($property['type'] == 'http://apinamespace.org/atom/username') { - $username = $property['value']; - break; - } - } - } + $link = $xrd->links->get('http://apinamespace.org/atom', 'application/atomsvc+xml'); + if (!is_null($link)) { + $svcDocUrl = $link->href; + if (isset($link['http://apinamespace.org/atom/username'])) { + $username = $link['http://apinamespace.org/atom/username']; break; } }