Get all sets of for "users"

Permalink
Hi,

I'm simply looking for a list of all sets in the user attributes.
I want to rebuild the registration page, but in 5.8 it's very complicated.
Any help!?

Best,

Corretje

DeWebmakers
 
shahroq replied on at Permalink Reply
shahroq
use Concrete\Core\Attribute\Key\Category as AttributeKeyCategory;
$categoryID = 2;//user attribute category:/dashboard/system/attributes/sets
$category = AttributeKeyCategory::getByID($categoryID);
$sets = $category->getController()->getSetManager()->getAttributeSets();
foreach ($sets as $set) {
    $setID = $set->getAttributeSetID();
    $setHandle = $set->getAttributeSetHandle();
    $setName = $set->getAttributeSetDisplayName();
    echo $setID." - ".$setHandle." - ".$setName."<br>";
    //get attributes assigned to this set:
    $attr_keys = $set->getAttributeKeys();
    foreach($attr_keys as $ak) {
        echo "----";
        echo $ak->getAttributeKeyID()." - ";
        echo $ak->getAttributeKeyName()." - ";