summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-02-21 22:52:27 -0500
committerEvan Prodromou <evan@status.net>2010-02-21 22:52:27 -0500
commita745d38d6d1ff336898b24decb54549c72ad1f99 (patch)
tree4c9289b7fac331f81f76c77010114f3cae82419b /classes
parent232b5efa7e5d2771ef50b8a5da90147bbff7af3f (diff)
slight rearrangement of getting profile URIs
Diffstat (limited to 'classes')
-rw-r--r--classes/Profile.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/classes/Profile.php b/classes/Profile.php
index 6b396c8c3..5ff746e30 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -841,28 +841,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;