username = $data['username']; } public function processRequest() { $viewer = $this->getRequest()->getUser(); $user = id(new PhabricatorUser())->loadOneWhere( 'userName = %s', $this->username); if (!$user) { return new Aphront404Response(); } $profile = id(new PhabricatorUserProfile())->loadOneWhere( 'userPHID = %s', $user->getPHID()); if (!$profile) { $profile = new PhabricatorUserProfile(); } $links = array(); if ($user->getPHID() == $viewer->getPHID()) { $links[] = phutil_render_tag( 'a', array( 'href' => '/profile/edit/', ), 'Edit Profile'); } $fbuid = null; // TODO: pull from OAuth stuff if ($fbuid) { $links[] = phutil_render_tag( 'a', array( 'href' => 'http://www.facebook.com/profile.php?id='.$fbuid, ), 'Facebook Profile'); } foreach ($links as $k => $link) { $links[$k] = '
PHID | '.phutil_escape_html($user->getPHID()).' |
---|---|
User Since | '.phabricator_format_timestamp($user->getDateCreated()).' |
Blurb | '.$blurb.' |
---|
'.
$username_tag.
$realname_tag.
$title_tag.
' '. $picture. ' '. $links. ' '. ' |
'. $content. ' |