forked from GNUsocial/gnu-social
use quote identifiers on the user table
This commit is contained in:
parent
403bb38bcd
commit
565dec0e21
@ -275,11 +275,14 @@ class User_group extends Memcached_DataObject
|
|||||||
// XXX: cache this
|
// XXX: cache this
|
||||||
|
|
||||||
$user = new User();
|
$user = new User();
|
||||||
|
if(common_config('db','quote_identifiers'))
|
||||||
|
$user_table = '"user"';
|
||||||
|
else $user_table = 'user';
|
||||||
|
|
||||||
$qry =
|
$qry =
|
||||||
'SELECT id ' .
|
'SELECT id ' .
|
||||||
'FROM user JOIN group_member '.
|
'FROM '. $user_table .' JOIN group_member '.
|
||||||
'ON user.id = group_member.profile_id ' .
|
'ON '. $user_table .'.id = group_member.profile_id ' .
|
||||||
'WHERE group_member.group_id = %d ';
|
'WHERE group_member.group_id = %d ';
|
||||||
|
|
||||||
$user->query(sprintf($qry, $this->id));
|
$user->query(sprintf($qry, $this->id));
|
||||||
|
Loading…
Reference in New Issue
Block a user