public function removeAllGroups()
    {
        $removed = [];

        foreach ($this->getMemberOf() as $group) {
            if ($this->removeGroup($group)) {
                $removed[] = $group;
            }
        }

        return $removed;
    }
public function removeAllGroups()
    {
        $removed = [];

        foreach ($this->getMemberOf() as $group) {
            if ($this->removeGroup($group)) {
                $removed[] = $group;
            }
        }

        return $removed;
    }
public function removeAllGroups ( ) { $ removed = [ ] ; foreach ( $ this -> getMemberOf ( ) as $ group ) { if ( $ this -> removeGroup ( $ group ) ) { $ removed [ ] = $ group ; } } return $ removed ; }
Removes the current model from all groups.

@return array The group distinguished names that were successfully removed
Removes the current model from all groups .