summaryrefslogtreecommitdiff
path: root/classes/User_group.php
diff options
context:
space:
mode:
authorBrenda Wallace <shiny@cpan.org>2009-06-27 10:31:31 +1200
committerBrenda Wallace <shiny@cpan.org>2009-07-15 20:18:39 +1200
commit565dec0e213570b2cad3fa11ec42caf5b52ce1c8 (patch)
treecbb44dd0ed2eff31f6693414ba000ce80787386f /classes/User_group.php
parent403bb38bcd191d7b4e9c62e7f5f4bbb3968729df (diff)
use quote identifiers on the user table
Diffstat (limited to 'classes/User_group.php')
-rw-r--r--classes/User_group.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/classes/User_group.php b/classes/User_group.php
index 27b444705..b1ab1c2d3 100644
--- a/classes/User_group.php
+++ b/classes/User_group.php
@@ -275,11 +275,14 @@ class User_group extends Memcached_DataObject
// XXX: cache this
$user = new User();
+ if(common_config('db','quote_identifiers'))
+ $user_table = '"user"';
+ else $user_table = 'user';
$qry =
'SELECT id ' .
- 'FROM user JOIN group_member '.
- 'ON user.id = group_member.profile_id ' .
+ 'FROM '. $user_table .' JOIN group_member '.
+ 'ON '. $user_table .'.id = group_member.profile_id ' .
'WHERE group_member.group_id = %d ';
$user->query(sprintf($qry, $this->id));