diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-02 09:32:24 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-02 09:32:24 +0000 |
commit | 1b6383e6fedaac90da8e50646005c21803a2661e (patch) | |
tree | c0605c44df601bab268635055e122f052468007d /engine/lib/pageowner.php | |
parent | 971a2fec754f6be795f9868ac91280f4a7d7c79e (diff) | |
download | elgg-1b6383e6fedaac90da8e50646005c21803a2661e.tar.gz elgg-1b6383e6fedaac90da8e50646005c21803a2661e.tar.bz2 |
Reverting page_owner
git-svn-id: https://code.elgg.org/elgg/trunk@325 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/pageowner.php')
-rw-r--r-- | engine/lib/pageowner.php | 11 |
1 files changed, 6 insertions, 5 deletions
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;
}
}
}
|