mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Updated group filter
Updated group filter
This commit is contained in:
parent
389bdb4ddf
commit
953dec8863
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user