aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop/update_email_hash.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-11-21 14:54:32 +0100
committerMarc Alexander <admin@m-a-styles.de>2019-11-21 14:54:32 +0100
commit2a023c9e15ffd03f07770adf6e8372d3b4e23057 (patch)
tree242e90b696746171f94d31bbf7c24afcf0550a92 /phpBB/develop/update_email_hash.php
parent289524938ca527816a902f1a2acb9cf385c2598d (diff)
parentc628cd7e151a09e25ca0d980620b5fa3fe36a763 (diff)
downloadforums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.tar
forums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.tar.gz
forums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.tar.bz2
forums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.tar.xz
forums-2a023c9e15ffd03f07770adf6e8372d3b4e23057.zip
Merge pull request #5727 from marc1706/ticket/16167
[ticket/16167] Use user_email column for checking duplicates
Diffstat (limited to 'phpBB/develop/update_email_hash.php')
-rw-r--r--phpBB/develop/update_email_hash.php56
1 files changed, 0 insertions, 56 deletions
diff --git a/phpBB/develop/update_email_hash.php b/phpBB/develop/update_email_hash.php
deleted file mode 100644
index c149900d64..0000000000
--- a/phpBB/develop/update_email_hash.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/**
-* Corrects user_email_hash values if DB moved from 32-bit system to 64-bit system or vice versa.
-* The CRC32 function in PHP generates different results for both systems.
-* @PHP dev team: no, a hexdec() applied to it does not solve the issue. And please document it.
-*
-*/
-die("Please read the first lines of this script for instructions on how to enable it");
-
-set_time_limit(0);
-
-define('IN_PHPBB', true);
-$phpbb_root_path = './../';
-$phpEx = substr(strrchr(__FILE__, '.'), 1);
-include($phpbb_root_path . 'common.' . $phpEx);
-
-// Start session management
-$user->session_begin();
-$auth->acl($user->data);
-$user->setup();
-
-$start = $request->variable('start', 0);
-$num_items = 1000;
-
-echo '<br />Updating user email hashes' . "\n";
-
-$sql = 'SELECT user_id, user_email
- FROM ' . USERS_TABLE . '
- ORDER BY user_id ASC';
-$result = $db->sql_query($sql);
-
-$echos = 0;
-while ($row = $db->sql_fetchrow($result))
-{
- $echos++;
-
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_email_hash = '" . $db->sql_escape(phpbb_email_hash($row['user_email'])) . "'
- WHERE user_id = " . (int) $row['user_id'];
- $db->sql_query($sql);
-
- if ($echos == 200)
- {
- echo '<br />';
- $echos = 0;
- }
-
- echo '.';
- flush();
-}
-$db->sql_freeresult($result);
-
-echo 'FINISHED';
-
-// Done
-$db->sql_close();