roundcubemail/program/lib/Roundcube/rcube_addressbook.php
public static function compose_contact_key($contact, $sort_col)
    {
        $key = $contact[$sort_col];

        // add email to a key to not skip contacts with the same name (#1488375)
        if (($email = self::get_col_values('email', $contact, true)) && !empty($email)) {
            $key .= ':' . implode(':', (array)$email);
        }

        // Make the key really unique (as we e.g. support contacts with no email)
        $key .= ':' . $contact['sourceid'] . ':' . $contact['ID'];

        return $key;
    }
public static function compose_contact_key($contact, $sort_col)
    {
        $key = $contact[$sort_col];

        // add email to a key to not skip contacts with the same name (#1488375)
        if (($email = self::get_col_values('email', $contact, true)) && !empty($email)) {
            $key .= ':' . implode(':', (array)$email);
        }

        // Make the key really unique (as we e.g. support contacts with no email)
        $key .= ':' . $contact['sourceid'] . ':' . $contact['ID'];

        return $key;
    }
public static function compose_contact_key ( $ contact , $ sort_col ) { $ key = $ contact [ $ sort_col ] ; // add email to a key to not skip contacts with the same name (#1488375) if ( ( $ email = self :: get_col_values ( 'email' , $ contact , true ) ) && ! empty ( $ email ) ) { $ key .= ':' . implode ( ':' , ( array ) $ email ) ; } // Make the key really unique (as we e.g. support contacts with no email) $ key .= ':' . $ contact [ 'sourceid' ] . ':' . $ contact [ 'ID' ] ; return $ key ; }
Create a unique key for sorting contacts

@param array  $contact  Contact record
@param string $sort_col Sorting column name

@return string Unique key
Create a unique key for sorting contacts