From 1b6383e6fedaac90da8e50646005c21803a2661e Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 2 Apr 2008 09:32:24 +0000 Subject: Reverting page_owner git-svn-id: https://code.elgg.org/elgg/trunk@325 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/pageowner.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'engine') diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php index 881c80f9c..845d9653f 100644 --- a/engine/lib/pageowner.php +++ b/engine/lib/pageowner.php @@ -15,7 +15,7 @@ /** * Gets the page owner for the current page. * @uses $CONFIG - * @return ElggUser|false The current page owner (false if none). + * @return int|false The current page owner guid (false if none). */ function page_owner() { @@ -23,15 +23,16 @@ global $CONFIG; if ($username = get_input("username")) { $user = get_user_by_username($username); - return $user; + return $user->getGUID(); } if ($owner = get_input("owner_id")) { - return get_user($owner); + $user = get_user($owner); + return $user->getGUID(); } if (!empty($CONFIG->page_owner_handlers) && is_array($CONFIG->page_owner_handlers)) { foreach($CONFIG->page_owner_handlers as $handler) { - if ($user = $handler()) { - return $user; + if ($guid = $handler()) { + return $guid; } } } -- cgit v1.2.3