src/Security/Member.php
public function removeFromGroupByCode($groupcode)
    {
        $group = Group::get()->filter(array('Code' => $groupcode))->first();

        if ($group) {
            $this->Groups()->remove($group);
        }
    }
public function removeFromGroupByCode($groupcode)
    {
        $group = Group::get()->filter(array('Code' => $groupcode))->first();

        if ($group) {
            $this->Groups()->remove($group);
        }
    }
public function removeFromGroupByCode ( $ groupcode ) { $ group = Group :: get ( ) -> filter ( array ( 'Code' => $ groupcode ) ) -> first ( ) ; if ( $ group ) { $ this -> Groups ( ) -> remove ( $ group ) ; } }
Removes a member from a group.

@param string $groupcode
Removes a member from a group .