Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

mix_email()

Description

Utility function to scramble an email address

Parameters

ColumnTypeDefaultDescription
$string string - email to scramble

Return

string

Location

include/migration_functions.php lines 543 to 563

Definition

 
function mix_email($string)
    {
    global 
$mixcache;
    if(isset(
$mixcache[md5($string)]))
        {
        return 
$mixcache[md5($string)];
        }

    
$emailparts explode("@",$string);
    if(
count($emailparts) < 2)
        {
        return 
mix_text($string);
        }

    
$newemail implode("@",array_map("mix_text",$emailparts));

    
// Update cache
    
$mixcache[md5($string)] = $newemail;

    return 
$newemail;    
    }

This article was last updated 25th November 2020 05:35 Europe/London time based on the source file dated 23rd November 2020 10:40 Europe/London time.