+ $this->element('accountProfilePage', array('rdf:resource' => $profile->profileurl));
+ if ($useruri) {
+ $this->element('sioc:account_of', array('rdf:resource'=>$useruri));
+ }
+
+ $person = array();
+
+ if ($isSubscriber) {
+ $this->element('sioc:follows', array('rdf:resource'=>$this->user->uri . '#acct'));
+ } else {
+ // Get people user is subscribed to
+ $sub = new Subscription();
+ $sub->subscriber = $profile->id;
+ $sub->whereAdd('subscriber != subscribed');
+
+ if ($sub->find()) {
+ while ($sub->fetch()) {
+ if (!empty($sub->token)) {
+ $other = Remote_profile::staticGet('id', $sub->subscribed);
+ } else {
+ $other = User::staticGet('id', $sub->subscribed);
+ }
+ if (empty($other)) {
+ common_debug('Got a bad subscription: '.print_r($sub,true));
+ continue;
+ }
+ $this->element('sioc:follows', array('rdf:resource' => $other->uri.'#acct'));
+ $person[$other->uri] = array(LISTENEE,
+ $other->id,
+ $other->nickname,
+ (empty($sub->token)) ? 'User' : 'Remote_profile');
+ $other->free();
+ $other = null;
+ unset($other);
+ }
+ }
+
+ $sub->free();
+ $sub = null;
+ unset($sub);
+ }
+