aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 19:27:58 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 19:27:58 +0000
commit1368785a6b6f9c946dcc5eca078540bacce71f60 (patch)
tree1aa0857127ef2f21cc2e64a608d94359da172bab /engine/lib/entities.php
parent9074f002ad0603014c90b12aaaf2c51d740638e9 (diff)
downloadelgg-1368785a6b6f9c946dcc5eca078540bacce71f60.tar.gz
elgg-1368785a6b6f9c946dcc5eca078540bacce71f60.tar.bz2
Refs #2543: Core uses the new functions from previous commit.
git-svn-id: http://code.elgg.org/elgg/trunk@8078 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 3ab53c678..bc097e4ab 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -424,7 +424,7 @@ function update_entity($guid, $owner_guid, $access_id, $container_guid = null) {
* A plugin hook container_permissions_check:$entity_type is emitted to allow granular
* access controls in plugins.
*
- * @param int $user_guid The user guid, or 0 for get_loggedin_userid()
+ * @param int $user_guid The user guid, or 0 for elgg_get_logged_in_user_guid()
* @param int $container_guid The container, or 0 for the current page owner.
* @param string $type The type of entity we're looking to write
* @param string $subtype The subtype of the entity we're looking to write
@@ -436,7 +436,7 @@ function can_write_to_container($user_guid = 0, $container_guid = 0, $type = 'al
$user_guid = (int)$user_guid;
$user = get_entity($user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
$container_guid = (int)$container_guid;
@@ -513,7 +513,7 @@ $container_guid = 0) {
$container_guid = $owner_guid;
}
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
if (!can_write_to_container($user->guid, $owner_guid, $type, $subtype)) {
return false;
}
@@ -1317,7 +1317,7 @@ function disable_entity($guid, $reason = "", $recursive = true) {
// @todo Do this better.
static $__RECURSIVE_DELETE_TOKEN;
// Make it slightly harder to guess
- $__RECURSIVE_DELETE_TOKEN = md5(get_loggedin_userid());
+ $__RECURSIVE_DELETE_TOKEN = md5(elgg_get_logged_in_user_guid());
$sub_entities = get_data("SELECT * from {$CONFIG->dbprefix}entities
WHERE container_guid=$guid
@@ -1423,7 +1423,7 @@ function delete_entity($guid, $recursive = true) {
// @todo Do this better.
static $__RECURSIVE_DELETE_TOKEN;
// Make it slightly harder to guess
- $__RECURSIVE_DELETE_TOKEN = md5(get_loggedin_userid());
+ $__RECURSIVE_DELETE_TOKEN = md5(elgg_get_logged_in_user_guid());
$sub_entities = get_data("SELECT * from {$CONFIG->dbprefix}entities
WHERE container_guid=$guid
@@ -1693,7 +1693,7 @@ function can_edit_entity($entity_guid, $user_guid = 0) {
$user_guid = (int)$user_guid;
$user = get_entity($user_guid);
if (!$user) {
- $user = get_loggedin_user();
+ $user = elgg_get_logged_in_user_entity();
}
$return = false;
@@ -2060,8 +2060,8 @@ function elgg_list_registered_entities($options) {
function recursive_delete_permissions_check() {
static $__RECURSIVE_DELETE_TOKEN;
- if ((isloggedin()) && ($__RECURSIVE_DELETE_TOKEN)
- && (strcmp($__RECURSIVE_DELETE_TOKEN, md5(get_loggedin_userid())))) {
+ if ((elgg_is_logged_in()) && ($__RECURSIVE_DELETE_TOKEN)
+ && (strcmp($__RECURSIVE_DELETE_TOKEN, md5(elgg_get_logged_in_user_guid())))) {
return true;
}