public function isMemberOf($group)
    {
        foreach ($this->attributes['member_of'] as $groups) {
            if (preg_match('/^CN=' . $group . '/', $groups)) {
                return true;
            }
        }

        return false;
    }