aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/group.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-18 18:29:44 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-18 18:29:44 +0000
commitf3711a1ebee80f0e922f5447b064718c77f979ec (patch)
tree4d9c8310e37a2e430dc42ac41298a21821c589a6 /engine/lib/group.php
parent361bff59658e6119b76e7ff31cd67c6054c93c8f (diff)
downloadelgg-f3711a1ebee80f0e922f5447b064718c77f979ec.tar.gz
elgg-f3711a1ebee80f0e922f5447b064718c77f979ec.tar.bz2
Moved can_write_to_container into elgglib
git-svn-id: https://code.elgg.org/elgg/trunk@1474 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/group.php')
-rw-r--r--engine/lib/group.php32
1 files changed, 0 insertions, 32 deletions
diff --git a/engine/lib/group.php b/engine/lib/group.php
index 90ee650f3..f0ceb92fc 100644
--- a/engine/lib/group.php
+++ b/engine/lib/group.php
@@ -276,38 +276,6 @@
}
/**
- * Determine whether a given user is able to write to a given group.
- *
- * @param int $user_guid The user guid, or 0 for $_SESSION['user']->getGUID()
- * @param int $container_guid The container, or 0 for the current page owner.
- */
- function can_write_to_container($user_guid = 0, $container_guid = 0)
- {
- global $CONFIG;
-
- $user_guid = (int)$user_guid;
- if (!$user_guid) $user_guid = $_SESSION['user']->getGUID();
- $user = get_entity($user_guid);
-
- $container_guid = (int)$container_guid;
- if (!$container_guid) $container_guid = page_owner();
- $container = get_entity($container_guid);
-
- if (($container) && ($user))
- {
- // Basics, see if the user is a member of the group.
- if ($container instanceof ElggGroup)
- if (!$container->isMember($user)) return false;
-
- // See if anyone else has anything to say
- return trigger_plugin_hook('group_permissions_check',$entity->type,array('container' => $container, 'user' => $user), false);
-
- }
-
- return false;
- }
-
- /**
* Get the group entity.
*
* @param int $guid