You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataList::relation has the following example in the documentation:
// Get members from all Groups:DataList::Create(\SilverStripe\Security\Group::class)->relation("Members");
But this returns an empty list. From the example's description, that should at least list the Default Administrator (who belongs to the Administrator Group). Is the method broken, or is the example bad?
// Get number of Members that are linked to any Group (supposedly):echoDataList::Create(\SilverStripe\Security\Group::class)->relation("Members")->Count(); // 0// Get number of Members linked to the Administrator Group:echo \SilverStripe\Security\Group::get()->byID(2)->Members()->Count(); // 1 or more
The text was updated successfully, but these errors were encountered:
Affected Version
silverstripe/recipe-cms 1.1.0
(i.e. framework 4.1.0)
Description
DataList::relation
has the following example in the documentation:But this returns an empty list. From the example's description, that should at least list the Default Administrator (who belongs to the Administrator Group). Is the method broken, or is the example bad?
(I'm trying to fix an issue in symbiote/silverstripe-memberprofiles where I have the same issue of
relation("Members")
returning an empty list)Steps to Reproduce
Just try this:
The text was updated successfully, but these errors were encountered: