$entity_guid = (int) $entity_guid;
$name = sanitise_string($name);
+ $entity = get_entity($entity_guid);
+ if (!$entity instanceof ElggEntity) {
+ return false;
+ }
+
$query = "SELECT value from {$CONFIG->dbprefix}private_settings
where name = '{$name}' and entity_guid = {$entity_guid}";
$setting = get_data_row($query);
global $CONFIG;
$entity_guid = (int) $entity_guid;
+ $entity = get_entity($entity_guid);
+ if (!$entity instanceof ElggEntity) {
+ return false;
+ }
$query = "SELECT * from {$CONFIG->dbprefix}private_settings where entity_guid = {$entity_guid}";
$result = get_data($query);
global $CONFIG;
$entity_guid = (int) $entity_guid;
+
+ $entity = get_entity($entity_guid);
+ if (!$entity instanceof ElggEntity) {
+ return false;
+ }
+
$name = sanitise_string($name);
return delete_data("DELETE from {$CONFIG->dbprefix}private_settings
global $CONFIG;
$entity_guid = (int) $entity_guid;
+
+ $entity = get_entity($entity_guid);
+ if (!$entity instanceof ElggEntity) {
+ return false;
+ }
+
return delete_data("DELETE from {$CONFIG->dbprefix}private_settings
where entity_guid = {$entity_guid}");
}