aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/pageowner.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/pageowner.php')
-rw-r--r--engine/lib/pageowner.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index 94765feee..7fd79e68a 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -39,7 +39,7 @@ function elgg_get_page_owner_guid($guid = 0) {
*
* @note Access is disabled when getting the page owner entity.
*
- * @return ElggEntity|false The current page owner or false if none.
+ * @return ElggUser|ElggGroup|false The current page owner or false if none.
*
* @since 1.8.0
*/
@@ -113,6 +113,7 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params)
}
if ($user = get_user_by_username($username)) {
+ elgg_set_ignore_access($ia);
return $user->getGUID();
}
}
@@ -140,7 +141,7 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params)
switch ($segments[1]) {
case 'owner':
case 'friends':
- $user = get_user_by_username($segments[2]);
+ $user = get_user_by_username(urldecode($segments[2]));
if ($user) {
elgg_set_ignore_access($ia);
return $user->getGUID();