aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggGroupItemVisibility.php
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2012-09-07 02:20:56 -0400
committerSteve Clay <steve@mrclay.org>2012-09-07 02:20:56 -0400
commita0005033ac0d69ef462ff27394cd1c34d5dd5fab (patch)
tree2b4005acb8af685b4a7b68f31aa4ff5c260f86a5 /engine/classes/ElggGroupItemVisibility.php
parent8916fcdca6a2950d210abd2db7e6fb104abec149 (diff)
downloadelgg-a0005033ac0d69ef462ff27394cd1c34d5dd5fab.tar.gz
elgg-a0005033ac0d69ef462ff27394cd1c34d5dd5fab.tar.bz2
Better logic for when to forward to login
Diffstat (limited to 'engine/classes/ElggGroupItemVisibility.php')
-rw-r--r--engine/classes/ElggGroupItemVisibility.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/engine/classes/ElggGroupItemVisibility.php b/engine/classes/ElggGroupItemVisibility.php
index 2c7e2abb4..743c935da 100644
--- a/engine/classes/ElggGroupItemVisibility.php
+++ b/engine/classes/ElggGroupItemVisibility.php
@@ -27,6 +27,11 @@ class ElggGroupItemVisibility {
public $reasonHidden = '';
/**
+ * @var bool
+ */
+ public $requireLogin = false;
+
+ /**
* Determine visibility of items within a container for the current user
*
* @param int $container_guid GUID of a container (may/may not be a group)
@@ -86,6 +91,11 @@ class ElggGroupItemVisibility {
$ret->reasonHidden = self::REASON_NOACCESS;
}
}
+
+ if ($ret->shouldHideItems && !$user) {
+ $ret->requireLogin = true;
+ }
+
$cache[$cache_key] = $ret;
}
return $cache[$cache_key];