Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 495 to 515

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 19th March 2024 08:05 Europe/London time based on the source file dated 26th February 2024 11:00 Europe/London time.