diff --git a/profiles/common/modules/custom/ecas/includes/ecas.inc b/profiles/common/modules/custom/ecas/includes/ecas.inc index a1125f727c..b5038b7aa8 100644 --- a/profiles/common/modules/custom/ecas/includes/ecas.inc +++ b/profiles/common/modules/custom/ecas/includes/ecas.inc @@ -928,8 +928,12 @@ function ecas_save_user($account, $edit, array $ecas_user_info, array $args = ar // Load the user account and update realname, to ensure the safe_value of // fields are updated. cache_clear_all(); - $update_account = user_load($account->uid, TRUE); - realname_update($update_account); + + if (module_exists('realname')) { + $update_account = user_load($account->uid, TRUE); + realname_update($update_account); + } + return $account; } diff --git a/profiles/common/modules/custom/nexteuropa_formatters/nexteuropa_formatters_fields/nexteuropa_formatters_fields.module b/profiles/common/modules/custom/nexteuropa_formatters/nexteuropa_formatters_fields/nexteuropa_formatters_fields.module index 1d39f5c6e5..4cbc49695f 100644 --- a/profiles/common/modules/custom/nexteuropa_formatters/nexteuropa_formatters_fields/nexteuropa_formatters_fields.module +++ b/profiles/common/modules/custom/nexteuropa_formatters/nexteuropa_formatters_fields/nexteuropa_formatters_fields.module @@ -436,6 +436,29 @@ function nexteuropa_formatters_fields_field_formatter_view($entity_type, $entity $elements[$delta] = $link; } } + elseif ('file' == $field['type']) { + foreach ($items as $delta => $item) { + $link = array( + '#theme' => 'link', + '#text' => $item['filename'], + '#path' => file_create_url($item['uri']), + '#options' => array( + 'attributes' => array( + 'target' => array( + '_blank', + ), + 'class' => array( + 'ecl-button', + 'ecl-button--default', + 'ecl-file__download', + 'ecl-button--file', + ), + ), + ), + ); + $elements[$delta] = $link; + } + } break; case 'ne_social_icon':