Collections functions
Encryption functions
General functions
Theme permission 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 540 to 560

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 16th July 2020 02:05 Europe/London time based on the source file dated 24th June 2020 15:23 Europe/London time.