2 // -------------------------------------------------------------
6 // FILENAME : calc_email_hash.php
7 // STARTED : Tue Feb 03, 2004
8 // COPYRIGHT : © 2004 phpBB Group
9 // WWW : http://www.phpbb.com/
10 // LICENCE : GPL vs2.0 [ see /docs/COPYING ]
12 // -------------------------------------------------------------
17 // This script is potentially dangerous.
18 // Remove or comment the next line (die(".... ) to enable this script.
19 // Do NOT FORGET to either remove this script or disable it after you have used it.
21 die("Please read the first lines of this script for instructions on how to enable it");
24 define('IN_PHPBB', 1);
25 define('PHPBB_ROOT_PATH', './../');
26 define('PHP_EXT', substr(strrchr(__FILE__
, '.'), 1));
27 include(PHPBB_ROOT_PATH
. 'common.' . PHP_EXT
);
32 // Batch query for group members, call group_user_del
33 $sql = "SELECT user_id, user_email
34 FROM {$table_prefix}users
36 $result = $db->sql_query($sql);
38 if ($row = $db->sql_fetchrow($result))
42 $sql = "UPDATE {$table_prefix}users
43 SET user_email_hash = " . (crc32(strtolower($row['user_email'])) . strlen($row['user_email'])) . '
44 WHERE user_id = ' . $row['user_id'];
49 while ($row = $db->sql_fetchrow($result));
51 echo "<br />Batch -> $start\n";
58 $db->sql_freeresult($result);
62 echo "<p><b>Done</b></p>\n";