diff --git a/phpBB/develop/calc_email_hash.php b/phpBB/develop/calc_email_hash.php
new file mode 100644
index 0000000000..a67b0f52a3
--- /dev/null
+++ b/phpBB/develop/calc_email_hash.php
@@ -0,0 +1,76 @@
+sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
+
+$start = 0;
+do
+{
+ // Batch query for group members, call group_user_del
+ $sql = "SELECT user_id, user_email
+ FROM {$table_prefix}users
+ LIMIT $start, 100";
+ $result = $db->sql_query($sql);
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ do
+ {
+ $sql = "UPDATE {$table_prefix}users
+ SET user_email_hash = " . (crc32(strtolower($row['user_email'])) . strlen($row['user_email'])) . '
+ WHERE user_id = ' . $row['user_id'];
+ $db->sql_query($sql);
+
+ $start++;
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ echo "
Batch -> $start\n";
+ flush();
+ }
+ else
+ {
+ $start = 0;
+ }
+ $db->sql_freeresult($result);
+}
+while ($start);
+
+echo "
Done
\n"; + +?> \ No newline at end of file