diff options
author | Maat <maat-pub@mageia.biz> | 2020-05-09 01:15:08 +0200 |
---|---|---|
committer | Maat <maat-pub@mageia.biz> | 2020-05-09 01:15:08 +0200 |
commit | 6985226b17e8a0ef0a720bf1d12fe0c216e13dab (patch) | |
tree | 116d2565ac02c40abe0548863c6badf8ec3e1d1e /phpBB/develop/update_email_hash.php | |
parent | 8ea437e30605e0f66b5220bf904a61d7c1d11ddd (diff) | |
parent | 8d00784dfe2c8bcb10843ff70b4cfa998d703285 (diff) | |
download | forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.gz forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.bz2 forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.tar.xz forums-6985226b17e8a0ef0a720bf1d12fe0c216e13dab.zip |
Diffstat (limited to 'phpBB/develop/update_email_hash.php')
-rw-r--r-- | phpBB/develop/update_email_hash.php | 56 |
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(); |