diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/pageowner.php | 16 |
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;
}
|