aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-21 10:13:51 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-21 10:13:51 +0000
commit591790174387f9b773c5e8414eda772dad5ede04 (patch)
treec9beaa9e678eb618250e5ab078cf0cdba5f4ffaa /engine/lib
parentae8f2d40a887125490819d7b51b3f78c1dbc0261 (diff)
downloadelgg-591790174387f9b773c5e8414eda772dad5ede04.tar.gz
elgg-591790174387f9b773c5e8414eda772dad5ede04.tar.bz2
Closes #699: get_user_by_username now using access controls. Will no longer throw exception when accessing disabled users.
git-svn-id: https://code.elgg.org/elgg/trunk@2588 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/users.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 3de4044ae..71a307457 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -765,7 +765,7 @@
if ( (isset($USERNAME_TO_GUID_MAP_CACHE[$username])) && (retrieve_cached_entity($USERNAME_TO_GUID_MAP_CACHE[$username])) )
return retrieve_cached_entity($USERNAME_TO_GUID_MAP_CACHE[$username]);
- $row = get_data_row("SELECT e.* from {$CONFIG->dbprefix}users_entity u join {$CONFIG->dbprefix}entities e on e.guid=u.guid where u.username='$username' ");
+ $row = get_data_row("SELECT e.* from {$CONFIG->dbprefix}users_entity u join {$CONFIG->dbprefix}entities e on e.guid=u.guid where u.username='$username' and $access ");
if ($row) {
$USERNAME_TO_GUID_MAP_CACHE[$username] = $row->guid;
return new ElggUser($row);