Make a custom module called 'email_lowercase' and place this code inside it, before runnin this new action, do on both emails 'convert a data type' to 'text', then run the new action this custom module provides with [email protected] TEXT-token-value you have just converted. After running custom action it will return a TEXT in lowercase, then comapre your email1-text-converted with the TEXT returned from custom module.
Note: you will nedd rules conditional module to compare (add conditional, add an IF) your variables AFTER this custom action is triggered.
Done.
<?php
/**
* Implement hook_rules_action_info()
* Declare any meta data about actions for Rules
*/
function email_lowercase_rules_action_info() {
$actions = array(
'email_lowercase_action' => array(
'label' => t('Convert to lowercase a TEXT email'),
'group' => t('custom'),
'parameter' => array(
'email' => array(
'type' => 'text',
'label' => t('$text-variable-token-Email to be lowercase'),
),
),
'provides' => array(
'email_lower_case' => array(
'type' => 'text',
'label' => t('email in lower case'),
),
),
),
);
return $actions;
}
// rules function numero a texto
function email_lowercase_action($email) {
$email_lower_case = array();
$email_lower_case = strtolower($email);
return array (
'email_lower_case' => $email_lower_case,
);
}
NOTE: there are no EMAIL data types for rules, thats way i suggested to firts convert an email field to text. It may work if you don't, i did not tryed that.