aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-18 17:15:02 -0500
committercash <cash.costello@gmail.com>2011-11-28 21:43:59 -0500
commit5544532155298be5a99139c8970e4c95a7756545 (patch)
tree5b2f9292f1693313771dba981319d632f8b55aae /engine/lib
parenta47f57775f3dfbb5f006c9a0fa8ea794ba46ad51 (diff)
downloadelgg-5544532155298be5a99139c8970e4c95a7756545.tar.gz
elgg-5544532155298be5a99139c8970e4c95a7756545.tar.bz2
Fixes #4112 get_user_by_username() returns false if no user
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/users.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 9cb8ddfa7..29fa4db2f 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -565,6 +565,8 @@ function get_user_by_username($username) {
$entity = get_data_row($query, 'entity_row_to_elggstar');
if ($entity) {
$USERNAME_TO_GUID_MAP_CACHE[$username] = $entity->guid;
+ } else {
+ $entity = false;
}
return $entity;