Adldap\Models\Traits\HasMemberOfTrait::getGroupNames PHP Method

getGroupNames() public method

If a recursive option is given, groups of groups are retrieved and then merged with the resulting collection.
public getGroupNames ( boolean $recursive = false ) : array
$recursive boolean
return array
    public function getGroupNames($recursive = false)
    {
        $names = $this->getGroups([], $recursive)->map(function (Group $group) {
            return $group->getCommonName();
        })->toArray();
        return array_unique($names);
    }