From 0ab318a43d6142963d88cb2671f4198bb39b3702 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 1 Mar 2017 11:20:39 +0100 Subject: [PATCH 1/2] Updated messaging ecf files. --- modules/messaging/messaging-safe.ecf | 2 +- modules/messaging/messaging.ecf | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 modules/messaging/messaging.ecf diff --git a/modules/messaging/messaging-safe.ecf b/modules/messaging/messaging-safe.ecf index 5b9da41..834adef 100644 --- a/modules/messaging/messaging-safe.ecf +++ b/modules/messaging/messaging-safe.ecf @@ -2,7 +2,7 @@ - diff --git a/modules/messaging/messaging.ecf b/modules/messaging/messaging.ecf new file mode 100644 index 0000000..72c5287 --- /dev/null +++ b/modules/messaging/messaging.ecf @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + From e89b04cbd2f9509b64b15bc76b0b452758e0de16 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 1 Mar 2017 12:34:08 +0100 Subject: [PATCH 2/2] Support profile_firstname and profile_lastname value when importing user records. --- src/service/cms_api_import_imp.e | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/service/cms_api_import_imp.e b/src/service/cms_api_import_imp.e index b27a8ef..a8ac53b 100644 --- a/src/service/cms_api_import_imp.e +++ b/src/service/cms_api_import_imp.e @@ -218,6 +218,7 @@ feature -- Import json_to_user (j: JSON_OBJECT): detachable CMS_USER local l_roles: ARRAYED_LIST [CMS_USER_ROLE] + s: STRING_32 do if attached json_string_item (j, "name") as l_name and then not l_name.is_whitespace then create Result.make (l_name) @@ -227,6 +228,20 @@ feature -- Import end if attached json_string_8_item (j, "profile_name") as l_profile_name then Result.set_profile_name (l_profile_name) + else + create s.make_empty + if attached json_string_8_item (j, "profile_firstname") as l_profile_firstname then + s.append (l_profile_firstname) + end + if attached json_string_8_item (j, "profile_lastname") as l_profile_lastname then + if not s.is_empty then + s.append_character (' ') + end + s.append (l_profile_lastname) + end + if not s.is_empty then + Result.set_profile_name (s) + end end if attached {JSON_ARRAY} j.item ("roles") as j_roles then