From 591790174387f9b773c5e8414eda772dad5ede04 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 21 Jan 2009 10:13:51 +0000 Subject: 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 --- engine/lib/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/lib') 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); -- cgit v1.2.3