1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-13 12:22:03 +02:00

[ticket/16167] Deprecate phpbb_email_hash() and remove gen_email_hash()

The latter one has been deprecated for 10 years now.

PHPBB3-16167
This commit is contained in:
Marc Alexander 2019-11-19 21:15:21 +01:00
parent 83d430419e
commit c628cd7e15
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
3 changed files with 14 additions and 22 deletions

View File

@ -263,18 +263,6 @@ function still_on_time($extra_time = 15)
return (ceil($current_time - $start_time) < $max_execution_time) ? true : false;
}
/**
* Hashes an email address to a big integer
*
* @param string $email Email address
*
* @return string Unsigned Big Integer
*/
function phpbb_email_hash($email)
{
return sprintf('%u', crc32(strtolower($email))) . strlen($email);
}
/**
* Wrapper for version_compare() that allows using uppercase A and B
* for alpha and beta releases.

View File

@ -659,3 +659,17 @@ function phpbb_inet_pton($address)
{
return inet_pton($address);
}
/**
* Hashes an email address to a big integer
*
* @param string $email Email address
*
* @return string Unsigned Big Integer
*
* @deprecated 3.3.0-b2 (To be removed: 4.0.0)
*/
function phpbb_email_hash($email)
{
return sprintf('%u', crc32(strtolower($email))) . strlen($email);
}

View File

@ -206,16 +206,6 @@ function get_group_id($group_name)
return $group_mapping['REGISTERED'];
}
/**
* Generate the email hash stored in the users table
*
* Note: Deprecated, calls should directly go to phpbb_email_hash()
*/
function gen_email_hash($email)
{
return phpbb_email_hash($email);
}
/**
* Convert a boolean into the appropriate phpBB constant indicating whether the topic is locked
*/