Skip to content

Commit 5ca9fd8

Browse files
committed
Merge remote-tracking branch 'origin/develop' into 140588_field_mapping_validation
# Conflicts: # admin/admin.GigyaSettings.php
2 parents 428c737 + 8428e0b commit 5ca9fd8

File tree

9 files changed

+47
-39
lines changed

9 files changed

+47
-39
lines changed

admin/admin.GigyaSettings.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public function __construct() {
2929
wp_enqueue_script( 'gigya_admin_js', GIGYA__PLUGIN_URL . 'admin/gigya_admin.js' );
3030
wp_enqueue_script( 'gigya_jsonlint_js', GIGYA__PLUGIN_URL . 'admin/jsonlint.js' );
3131

32-
3332
// Actions.
3433
add_action( 'admin_init', array( $this, 'adminInit' ) );
3534
add_action( 'admin_menu', array( $this, 'adminMenu' ) );
@@ -534,28 +533,28 @@ public static function fieldsMappingWarningsBuilder( $case_str, $fields, $soluti
534533
* Set the POSTed secret key.
535534
* If it's not submitted, take it from DB.
536535
*
537-
* @param string $field The obfuscated field
536+
* @param string $field The obfuscated field
538537
*
539538
* @return bool
540539
*/
541540
private static function _setObfuscatedField( $field ) {
542-
if ( empty( $_POST['gigya_global_settings'][ $field ] ) ) {
541+
if ( empty( $_POST['gigya_global_settings'][$field] ) ) {
543542
$options = static::_getSiteOptions();
544543
if ( $options === false ) {
545544
return false;
546545
}
547546

548-
$_POST['gigya_global_settings'][ $field ] = $options[ $field ];
547+
$_POST['gigya_global_settings'][$field] = $options[$field];
549548
} else {
550-
$_POST['gigya_global_settings'][ $field ] = GigyaApiHelper::encrypt( $_POST['gigya_global_settings'][ $field ], SECURE_AUTH_KEY );
549+
$_POST['gigya_global_settings'][$field] = GigyaApiHelper::encrypt( $_POST['gigya_global_settings'][$field], SECURE_AUTH_KEY );
551550
}
552551

553552
return true;
554553
}
555554

556555
private static function setError( $errorCode, $errorMessage, $callId = null ) {
557-
$errorLink = "<a href='https://developers.gigya.com/display/GD/Response+Codes+and+Errors+REST' target='_blank' rel='noopener noreferrer'>Response_Codes_and_Errors</a>";
558-
$message = "SAP CDC API error: {$errorCode} - {$errorMessage}.";
556+
$errorLink = "<a href='https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/416d41b170b21014bbc5a10ce4041860.html' target='_blank' rel='noopener noreferrer'>Response_Codes_and_Errors</a>";
557+
$message = "SAP CDC API error: {$errorCode} - {$errorMessage}.";
559558
add_settings_error( 'gigya_global_settings', 'api_validate', __( $message . " For more information please refer to {$errorLink}", 'error' ) );
560559
error_log( 'Error updating SAP CDC settings: ' . $message . ' Call ID: ' . $callId );
561560
}

admin/forms/fieldMappingForm.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function fieldMappingForm() {
99

1010
if ( $login_options['mode'] == 'raas' ) {
1111
$form['map_fieldmapping_desc'] = [
12-
'markup' => __( '<p>Define which fields to map from SAP Customer Data Cloud to WordPress. The WordPress mapped target fields will be populated with data copied from the corresponding source fields. Learn more <a href="https://developers.gigya.com/display/GD/WordPress+Plugin#WordPressPlugin-UserManagementSettings" target="_blank" rel="noopener noreferrer" />here</a>.</p>' ),
12+
'markup' => __( '<p>Define which fields to map from SAP Customer Data Cloud to WordPress. The WordPress mapped target fields will be populated with data copied from the corresponding source fields. Learn more <a href="https://github.com/gigya/wordpress/wiki#mapping-gigya-user-fields-to-wordpress-fields-1" target="_blank" rel="noopener noreferrer" />here</a>.</p>' ),
1313
];
1414

1515
$gigya_full_map = _gigParam( $values, 'map_raas_full_map', '' );
@@ -53,7 +53,7 @@ function fieldMappingForm() {
5353
];
5454
} elseif ( $login_options['mode'] == 'wp_sl' ) {
5555
$form['map_social_title'] = [
56-
'markup' => __( '<h4>Mapping SAP Customer Data Cloud user fields to WordPress fields</h4><p>Define which fields to map from SAP CDC to WordPress. The WordPress mapped target fields will be populated with data copied from the corresponding source fields. Learn more <a href="https://developers.gigya.com/display/GD/WordPress+Plugin#WordPressPlugin-UserManagementSettings" target="_blank" rel="noopener noreferrer" />here</a></p>' ),
56+
'markup' => __( '<h4>Mapping SAP Customer Data Cloud user fields to WordPress fields</h4><p>Define which fields to map from SAP CDC to WordPress. The WordPress mapped target fields will be populated with data copied from the corresponding source fields. Learn more <a href="https://github.com/gigya/wordpress/wiki#mapping-gigya-user-fields-to-wordpress-fields-1" target="_blank" rel="noopener noreferrer" />here</a></p>' ),
5757
];
5858

5959
$form['map_social_first_name'] = [

admin/forms/globalSettingsForm.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function globalSettingsForm() {
101101
'type' => 'text',
102102
'label' => __( 'List of providers' ),
103103
'value' => _gigParam( $values, 'enabledProviders', '*' ),
104-
'desc' => __( 'Comma separated list of providers to include. For example: facebook,twitter,google. Leave empty or type * for all providers. See the entire ' ) . ' <a href="https://developers.gigya.com/display/GD/socialize.showLoginUI+JS">list of available providers</a>.'
104+
'desc' => __( 'Comma separated list of providers to include. For example: facebook,twitter,google. Leave empty or type * for all providers. See the entire ' ) . ' <a href="https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/417916f470b21014bbc5a10ce4041860.html">list of available providers</a>.'
105105
);
106106

107107
$form['lang'] = array(
@@ -149,7 +149,7 @@ function globalSettingsForm() {
149149
'class' => 'json',
150150
'value' => _gigParam( $values, 'advanced', '' ),
151151
'label' => __( 'Additional Parameters (advanced)' ),
152-
'desc' => sprintf( __( 'Enter valid %s. See list of available ' ), '<a class="gigya-json-example" href="javascript:void(0)">' . __( 'JSON format' ) . '</a>' ) . ' <a href="https://developers.gigya.com/display/GD/Global+Configuration#GlobalConfiguration-DataMembers" target="_blank" rel="noopener noreferrer">' . __( 'parameters' ) . '</a>'
152+
'desc' => sprintf( __( 'Enter valid %s. See list of available ' ), '<a class="gigya-json-example" href="javascript:void(0)">' . __( 'JSON format' ) . '</a>' ) . ' <a href="https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/417fa48b70b21014bbc5a10ce4041860.html" target="_blank" rel="noopener noreferrer">' . __( 'parameters' ) . '</a>'
153153
);
154154

155155
$form['google_analytics'] = array(
@@ -182,7 +182,7 @@ function globalSettingsForm() {
182182

183183
if ( get_option( 'gigya_settings_fields' ) ) {
184184
$form['clean_db'] = array(
185-
'markup' => '<a href="javascript:void(0)" class="clean-db">Database cleaner after upgrade</a><br><small>Press this button to remove all unnecessary elements of the previous version from your database.Please make sure to backup your database before performing the clean. Learn more about upgrading from the previous version <a href="https://developers.gigya.com/display/GD/WordPress+Plugin#WordPressPlugin-InstallingtheGigyaPluginforWordPress">here.</a></small>'
185+
'markup' => '<a href="javascript:void(0)" class="clean-db">Database cleaner after upgrade</a><br><small>Press this button to remove all unnecessary elements of the previous version from your database.Please make sure to backup your database before performing the clean.For more information about upgrading from the previous version <a href="https://github.com/gigya/wordpress/wiki#installing-the-gigya-plugin-for-wordpress-1">here.</a></small>'
186186
);
187187
}
188188

admin/forms/loginSettingsForm.php

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function loginSettingsForm() {
1717
'options' => array(
1818
'wp_only' => __( 'WordPress only' ),
1919
'wp_sl' => __( 'WordPress + Social Login <small class="gigya-raas-warn hidden">Warning: this site is configured on SAP CDC server to use Registration-as-a-Service. Please contact your SAP CDC account manager for migration instruction.</small>' ),
20-
'raas' => __( 'Registration-as-a-Service <small>Selecting this option overrides the WordPress user management system. This requires additional administration steps. Learn more <a href="https://developers.gigya.com/display/GD/WordPress#WordPress-UserManagementSettings">here</a></small>' )
20+
'raas' => __( 'Registration-as-a-Service <small>Selecting this option overrides the WordPress user management system. This requires additional administration steps. Learn more <a href="https://github.com/gigya/wordpress/wiki#user-management-settings">here</a></small>' )
2121
),
2222
'value' => _gigParam( $values, 'mode', 'wp_only' ),
2323
'class' => 'raas_disabled'
@@ -30,16 +30,19 @@ function loginSettingsForm() {
3030
}
3131
catch ( GSException $e ) {
3232
$is_raas = true;
33-
$form['raas_error'] = [
34-
'markup' => '<div id="setting-error-api_validate" class="error settings-error notice is-dismissible">
35-
<p>
36-
<strong>' . __( 'Error determining RaaS status. There could be an issue with your machine or SAP CDC account. Please contact support if the problem persists. Message from SAP CDC') . ': ' . $e->getMessage() . '.
37-
For more information please refer to <a href="https://developers.gigya.com/display/GD/Response+Codes+and+Errors+REST" target="_blank" rel="noopener noreferrer">Response_Codes_and_Errors</a>.
38-
</strong>
39-
</p>
40-
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
41-
</div>',
42-
];
33+
34+
if ( ! empty( $global_settings ) ) {
35+
$form['raas_error'] = [
36+
'markup' => '<div id="setting-error-api_validate" class="error settings-error notice is-dismissible">
37+
<p>
38+
<strong>' . __( 'Error determining RaaS status. There could be an issue with your machine or SAP CDC account. Please contact support if the problem persists. Message from SAP CDC' ) . ': ' . $e->getMessage() . '.
39+
For more information please refer to <a href="https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/416d41b170b21014bbc5a10ce4041860.html" target="_blank" rel="noopener noreferrer">Response_Codes_and_Errors</a>.
40+
</strong>
41+
</p>
42+
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
43+
</div>',
44+
];
45+
}
4346
}
4447

4548
if ( $is_raas ) {
@@ -127,14 +130,14 @@ function loginSettingsForm() {
127130
'type' => 'textarea',
128131
'label' => __( "Additional Parameters (advanced) LoginUI" ),
129132
'value' => _gigParam( $values, 'advancedLoginUI', '' ),
130-
'desc' => sprintf( __( 'Enter valid %s. See list of available:' ), '<a class="gigya-json-example" href="javascript:void(0)">' . __( 'JSON format' ) . '</a>' ) . ' <a href="https://developers.gigya.com/display/GD/socialize.showLoginUI+JS" target="_blank" rel="noopener noreferrer">' . __( 'parameters' ) . '</a>'
133+
'desc' => sprintf( __( 'Enter valid %s. See list of available:' ), '<a class="gigya-json-example" href="javascript:void(0)">' . __( 'JSON format' ) . '</a>' ) . ' <a href="https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/417916f470b21014bbc5a10ce4041860.html" target="_blank" rel="noopener noreferrer">' . __( 'parameters' ) . '</a>'
131134
);
132135

133136
$form['advancedAddConnectionsUI'] = array(
134137
'type' => 'textarea',
135138
'label' => __( "Additional Parameters (advanced) AddConnectionsUI" ),
136139
'value' => _gigParam( $values, 'advancedAddConnectionsUI', '' ),
137-
'desc' => sprintf( __( 'Enter valid %s. See list of available:' ), '<a class="gigya-json-example" href="javascript:void(0)">' . __( 'JSON format' ) . '</a>' ) . ' <a href="https://developers.gigya.com/display/GD/socialize.showAddConnectionsUI+JS" target="_blank" rel="noopener noreferrer">' . __( 'parameters' ) . '</a>'
140+
'desc' => sprintf( __( 'Enter valid %s. See list of available:' ), '<a class="gigya-json-example" href="javascript:void(0)">' . __( 'JSON format' ) . '</a>' ) . ' <a href="https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/4178f00d70b21014bbc5a10ce4041860.html" target="_blank" rel="noopener noreferrer">' . __( 'parameters' ) . '</a>'
138141
);
139142

140143
$form['sl_end'] = array(

admin/forms/sessionManagementForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function sessionManagementForm() {
8989
if ( get_option( 'gigya_settings_fields' ) )
9090
{
9191
$form['clean_db'] = array(
92-
'markup' => '<a href="javascript:void(0)" class="clean-db">Database cleaner after upgrade</a><br><small>Press this button to remove all unnecessary elements of the previous version from your database.Please make sure to backup your database before performing the clean. Learn more about upgrading from the previous version <a href="https://developers.gigya.com/display/GD/WordPress+Plugin#WordPressPlugin-InstallingtheGigyaPluginforWordPress">here.</a></small>',
92+
'markup' => '<a href="javascript:void(0)" class="clean-db">Database cleaner after upgrade</a><br><small>Press this button to remove all unnecessary elements of the previous version from your database.Please make sure to backup your database before performing the clean. Learn more about upgrading from the previous version <a href="https://github.com/gigya/wordpress/wiki#installing-the-gigya-plugin-for-wordpress">here.</a></small>',
9393
);
9494
}
9595

cms_kit/GigyaCMS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public function userLogout( $guid ) {
269269
* @param array $params .
270270
* an associative array of params to pass to Gigya
271271
*
272-
* @see http://developers.gigya.com/020_Client_API/020_Methods/socialize.getFriends
272+
* @see https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/4174b27f70b21014bbc5a10ce4041860.html
273273
* @return array | false
274274
* the response from gigya.
275275
*

gigya.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: SAP Customer Data Cloud
44
* Plugin URI: https://www.sap.com/products/crm/customer-data-management.html
55
* Description: Allows sites to utilize the SAP Customer Data Cloud API for authentication and social network updates.
6-
* Version: 6.1.1
6+
* Version: 6.2.0
77
* Author: SAP SE
88
* Author URI: https://www.sap.com/products/crm/customer-data-management.html
99
* License: Apache v2.0
@@ -20,7 +20,7 @@
2020
*/
2121
define( 'GIGYA__MINIMUM_WP_VERSION', '4.7' );
2222
define( 'GIGYA__MINIMUM_PHP_VERSION', '7.0' );
23-
define( 'GIGYA__VERSION', '6.1.1' );
23+
define( 'GIGYA__VERSION', '6.2.0' );
2424
define( 'GIGYA__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
2525
define( 'GIGYA__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
2626
define( 'GIGYA__USER_FILES', GIGYA__PLUGIN_DIR . 'user_files/' );

readme.txt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributors: SAP SE/gigya.com konforti, luciodiri, ynhockey, shaharzillber.
44
Tags: CIAM, CIM, Registration, Social Login, Oauth, OpenSocial, Graph API, Facebook Connect, Linkedin, Twitter, authentication, OpenID, newsfeed, tweet, status update, registration, social APIs, sharing, plugin, social bookmark, social network, Facebook, community, comments, reactions, game mechanics, register, SAP Customer Data Cloud, Social Infrastructure, feed
55
Requires at least: 4.2
66
Tested up to: 4.9
7-
Stable tag: 6.1.1
7+
Stable tag: 6.2.0
88
License: Apache v2.0
99

1010
Integrate your WordPress site with SAP Customer Data Cloud.
@@ -32,12 +32,12 @@ More than 700 of the world’s leading businesses such as Fox, Forbes, and Veriz
3232

3333

3434

35-
For more information, installation steps and configuration options - please refer to SAP Customer Data Cloud's [WP Documentation](https://developers.gigya.com/display/GD/WordPress "SAP CDC WP documentation")
35+
For more information, installation steps and configuration options - please refer to SAP Customer Data Cloud's [WP Documentation](https://github.com/gigya/wordpress/wiki "SAP CDC WP documentation")
3636

3737

3838
== Installation ==
3939

40-
You can read more about the installation steps and other advanced configuration options in SAP Customer Data Cloud's online [WP Documentation](https://developers.gigya.com/display/GD/WordPress "SAP CDC WP documentation")
40+
You can read more about the installation steps and other advanced configuration options in SAP Customer Data Cloud's online [WP Documentation](https://github.com/gigya/wordpress/wiki "SAP CDC WP documentation")
4141

4242
1. After downloading the SAP Customer Data Cloud plug-in, unpack and upload the folder to the the /wp-content/plugins/ directory on your blog.
4343
2. Go to the Plug-in tab in the WordPress administration panel, find the SAP Customer Data Cloud plug-in on the list and click Activate.
@@ -82,19 +82,19 @@ For question about installations or configuration, please contact your account m
8282

8383

8484
= 4.0 =
85-
* Added [Reaction bar](https://developers.gigya.com/display/GD/Reactions)
86-
* Added [Gamification](https://developers.gigya.com/display/GD/Loyalty+-+Gamification+and+User+Behavior)
85+
* Added Reaction bar
86+
* Added Gamification
8787
* Activity Feed
88-
* Upgraded [Comments plugin](https://developers.gigya.com/display/GD/Comments)
88+
* Upgraded Comments plugin
8989
* Support connecting to an alternative data centers (e.g. Europe data center)
9090
* Improved administration
9191
* Integrated Google Analytics
9292
* Debug log
9393

9494
= 5.0 =
9595
* The Plugin has been rewritten, providing improved architecture, administration and security.
96-
* [Registration-as-a-Service Integration](https://developers.gigya.com/display/GD/Customer+Identity).
97-
* [Ratings & Reviews](https://developers.gigya.com/display/GD/R+and+R).
96+
* [Registration-as-a-Service Integration](https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/414f36ba70b21014bbc5a10ce4041860.html).
97+
* Ratings & Reviews
9898
* Added SEO support in the Comments and Rating&Reviews plugins, meaning the comments/reviews content is searchable by the main search engines.
9999
* All social plugins are provides as WP widgets that can be placed anywhere on your site.
100100

@@ -112,7 +112,7 @@ For question about installations or configuration, please contact your account m
112112
* Fixed breaking change: Strings must be enclosed with quotes in search queries
113113

114114
= 5.2 =
115-
* For security reasons, the Secret Key can now only be viewed or edited by privileged users. By default only by <strong>network admins</strong> (in a multi-site installation) or <strong>admins</strong> (in a single-site installation). Learn more in (https://developers.gigya.com/display/GD/WordPress+Plugin#WordPressPlugin-RolesandPermissions) Roles and Permissions</a>.
115+
* For security reasons, the Secret Key can now only be viewed or edited by privileged users. By default only by <strong>network admins</strong> (in a multi-site installation) or <strong>admins</strong> (in a single-site installation). Learn more in (https://github.com/gigya/wordpress/wiki#roles-and-permissions)</a>.
116116
* Security enhancements
117117

118118
= 5.2.2.2 =
@@ -208,11 +208,16 @@ For question about installations or configuration, please contact your account m
208208
* Updated CN data center host name
209209
* Fixed possible PHP notices/warnings in the admin UI
210210

211+
= 6.2.0 =
212+
* Added a report that can be generated to find out which users are not synchronized between WordPress and SAP CDC
213+
* Added a configuration option for user verification by UID only (recommended)
214+
* Fixed an issue when the Override WordPress Link option was unchecked
215+
211216
== FAQ ==
212217

213218
Can I configure the design of the SAP Customer Data Cloud component?
214219

215-
Yes, the design is fully configurable. You can read more about configuring the SAP Customer Data Cloud component design in our online [Documentation](https://developers.gigya.com/display/GD/WordPress )
220+
Yes, the design is fully configurable. You can read more about configuring the SAP Customer Data Cloud component design in our online [Documentation](https://github.com/gigya/wordpress/wiki )
216221

217222
How can I get support for the SAP Customer Data Cloud Plugin?
218223

user_files/.htaccess

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deny from all

0 commit comments

Comments
 (0)