public function addGroup($group)
{
if (is_string($group)) {
// If the group is a string, we'll assume the dev is passing
// in a DN string of the group. We'll try to locate it.
$group = $this->getQuery()->newInstance()->findByDn($group);
}
if ($group instanceof Group) {
// If the group is Group model instance, we can
// add the current models DN to the group.
return $group->addMember($this->getDn());
}
return false;
}