From 953dec886333b2eff514b4ce0db347b2aa1897ed Mon Sep 17 00:00:00 2001 From: andrewvt Date: Fri, 1 Nov 2013 07:22:13 -0400 Subject: [PATCH] Updated group filter Updated group filter --- security/Member.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/Member.php b/security/Member.php index 0a213b7e8..7be4274d0 100644 --- a/security/Member.php +++ b/security/Member.php @@ -882,7 +882,7 @@ class Member extends DataObject implements TemplateGlobalProvider { * @param string $groupcode */ public function removeFromGroupByCode($groupcode) { - $group = DataObject::get_one('Group', "\"Code\" = '" . Convert::raw2sql($groupcode). "'"); + $group = Group::get()->filter(array('Code' => $groupcode))->first(); if($group) { $this->Groups()->remove($group);