function multiple_email_user_emails_property_get in Multiple E-mail Addresses 2.x
Same name and namespace in other branches
- 7 multiple_email.module \multiple_email_user_emails_property_get()
Getter callback for multiple_email property.
1 string reference to 'multiple_email_user_emails_property_get'
- multiple_email_entity_property_info_alter in ./
multiple_email.module - Implements hook_entity_property_info_alter().
File
- ./
multiple_email.module, line 884 - multiple_email module file
Code
function multiple_email_user_emails_property_get($user, array $options, $name, $entity_type) {
$query = new EntityFieldQuery();
$query
->entityCondition('entity_type', 'multiple_email')
->propertyCondition('uid', $user->uid);
$result = $query
->execute();
$result += array(
'multiple_email' => array(),
);
$entity_ids = array_keys($result['multiple_email']);
return $entity_ids;
}