aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/pageowner.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-02 09:34:20 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-02 09:34:20 +0000
commitceefcc35589323630bc5fedb6cdcc0c38bd46d06 (patch)
tree29c2dbdbd87c8641523b1f46638efb5a5c542202 /engine/lib/pageowner.php
parent1b6383e6fedaac90da8e50646005c21803a2661e (diff)
downloadelgg-ceefcc35589323630bc5fedb6cdcc0c38bd46d06.tar.gz
elgg-ceefcc35589323630bc5fedb6cdcc0c38bd46d06.tar.bz2
Fix to previous
git-svn-id: https://code.elgg.org/elgg/trunk@326 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/pageowner.php')
-rw-r--r--engine/lib/pageowner.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index 845d9653f..3cc0130f4 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -22,12 +22,18 @@
global $CONFIG;
if ($username = get_input("username")) {
- $user = get_user_by_username($username);
- return $user->getGUID();
+ if ($user = get_user_by_username($username)) {
+ return $user->getGUID();
+ } else {
+ return 0;
+ }
}
if ($owner = get_input("owner_id")) {
- $user = get_user($owner);
- return $user->getGUID();
+ if ($user = get_user($owner)) {
+ return $user->getGUID();
+ } else {
+ return 0;
+ }
}
if (!empty($CONFIG->page_owner_handlers) && is_array($CONFIG->page_owner_handlers)) {
foreach($CONFIG->page_owner_handlers as $handler) {
@@ -36,7 +42,7 @@
}
}
}
- return false;
+ return 0;
}