From 89c57a8eeb223974a64dfbb28e6314e63a7fe9ec Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 16 Nov 2010 02:12:57 +0000 Subject: Fixes #2573 upgrade script for new user validation approach git-svn-id: http://code.elgg.org/elgg/trunk@7326 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/upgrades/2010111501.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 engine/lib/upgrades/2010111501.php (limited to 'engine/lib/upgrades/2010111501.php') diff --git a/engine/lib/upgrades/2010111501.php b/engine/lib/upgrades/2010111501.php new file mode 100644 index 000000000..15e4a7d35 --- /dev/null +++ b/engine/lib/upgrades/2010111501.php @@ -0,0 +1,33 @@ +dbprefix}entities e + WHERE e.type = 'user' AND e.enabled = 'no' AND + NOT EXISTS ( + SELECT 1 FROM {$CONFIG->dbprefix}metadata md + WHERE md.entity_guid = e.guid + AND md.name_id = $validated_id + AND md.value_id = $one_id)"; + +$user_guids = mysql_query($query); +while ($user_guid = mysql_fetch_object($user_guids)) { + create_metadata($user_guid->guid, 'validated', false, '', 0, ACCESS_PUBLIC, false); +} + +access_show_hidden_entities($hidden_entities); +elgg_set_ignore_access($ia); -- cgit v1.2.3