Collections functions
General functions
Render 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 504 to 524

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 2nd October 2022 18:05 Europe/London time based on the source file dated 28th June 2022 15:27 Europe/London time.