summaryrefslogtreecommitdiff
path: root/classes/Profile.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-22 01:23:24 -0800
committerZach Copley <zach@status.net>2010-02-22 01:23:24 -0800
commit35be39e30eacda1b0425a2ae9f8e58cd0867d157 (patch)
treedf86f17a666e5d0bb775dbcef0fc4eb5b1c777f3 /classes/Profile.php
parent47300a2ae9a51108fbf59a57cf5ab6e8867b54a6 (diff)
parent17ed30dffc1c05259baf2f0387089547e39684d7 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'classes/Profile.php')
-rw-r--r--classes/Profile.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/classes/Profile.php b/classes/Profile.php
index 4f67fc0bc..1ba3281ff 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -882,28 +882,22 @@ class Profile extends Memcached_DataObject
{
$uri = null;
- // check for a local user first
- $user = User::staticGet('id', $this->id);
+ // give plugins a chance to set the URI
+ if (Event::handle('StartGetProfileUri', array($this, &$uri))) {
- if (!empty($user)) {
- $uri = common_local_url(
- 'userbyid',
- array('id' => $user->id)
- );
- } else {
-
- // give plugins a chance to set the URI
- if (Event::handle('StartGetProfileUri', array($this, &$uri))) {
+ // check for a local user first
+ $user = User::staticGet('id', $this->id);
+ if (!empty($user)) {
+ $uri = $user->uri;
+ } else {
// return OMB profile if any
$remote = Remote_profile::staticGet('id', $this->id);
-
if (!empty($remote)) {
$uri = $remote->uri;
}
-
- Event::handle('EndGetProfileUri', array($this, &$uri));
}
+ Event::handle('EndGetProfileUri', array($this, &$uri));
}
return $uri;