mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
MINOR: removed accidental debug::show left in last commit (again)
This commit is contained in:
parent
9afc8a452f
commit
1e58cca92c
@ -127,11 +127,9 @@ class LeftAndMainSubsites extends Extension {
|
|||||||
$member = Member::currentUser();
|
$member = Member::currentUser();
|
||||||
if ($member && $member->isAdmin()) return true; //admin can access all subsites
|
if ($member && $member->isAdmin()) return true; //admin can access all subsites
|
||||||
|
|
||||||
// Switch to a subsite that this user can actually access.
|
|
||||||
$sites = Subsite::accessible_sites("CMS_ACCESS_{$this->owner->class}")->toDropdownMap();
|
$sites = Subsite::accessible_sites("CMS_ACCESS_{$this->owner->class}")->toDropdownMap();
|
||||||
if($sites && !isset($sites[Subsite::currentSubsiteID()])) {
|
if($sites && !isset($sites[Subsite::currentSubsiteID()])) {
|
||||||
$siteIDs = array_keys($sites);
|
$siteIDs = array_keys($sites);
|
||||||
Debug::Show($siteIDs[0]);
|
|
||||||
Subsite::changeSubsite($siteIDs[0]);
|
Subsite::changeSubsite($siteIDs[0]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user