Skip to content

Commit 3806d52

Browse files
authored
Merge pull request #155 from gigya/develop
1.9.0 (#154)
2 parents c0c1036 + ee82fc5 commit 3806d52

File tree

7 files changed

+36
-18
lines changed

7 files changed

+36
-18
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Through normal pull request process. Please target the `develop` branch.
55
## License
66

77
GPL 2.0 or later, unless stated otherwise in the `LICENSE` file.
8+

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "drupal-module",
44
"description": "Gigya Drupal module",
55
"license": "GPL-2.0-or-later",
6-
"version": "1.8.2",
6+
"version": "1.9.0",
77
"authors": [
88
{
99
"name": "Yuval Perelman",

gigya/gigya.info.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ type: module
33
description: 'Gigya core module'
44
package: Gigya
55
configure: gigya.admin.form
6-
version: '1.8.1'
7-
core_version_requirement: ^8 || ^9 || ^10
6+
version: '1.9.0'
7+
core_version_requirement: ^8 || ^9 || ^10 || ^11

gigya_ds/gigya_ds.info.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ package: Gigya
55
dependencies:
66
- gigya
77
- gigya_raas
8-
version: '1.8.1'
9-
core_version_requirement: ^8 || ^9 || ^10
8+
version: '1.9.0'
9+
core_version_requirement: ^8 || ^9 || ^10 || ^11

gigya_raas/gigya_raas.info.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ package: Gigya
55
configure: gigya.raas.config
66
dependencies:
77
- gigya
8-
version: '1.8.1'
9-
core_version_requirement: ^8 || ^9 || ^10
8+
version: '1.9.0'
9+
core_version_requirement: ^8 || ^9 || ^10 || ^11

gigya_raas/src/Form/GigyaFieldmappingForm.php

+26-9
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,15 @@
88
use Drupal\gigya\Helper\GigyaHelper;
99
use Drupal\gigya\Helper\GigyaHelperInterface;
1010
use Drupal\gigya_raas\Helper\GigyaRaasHelper;
11+
use Drupal\Core\Config\TypedConfigManagerInterface;
1112

1213

1314
class GigyaFieldmappingForm extends ConfigFormBase {
1415

15-
private $raas_helper;
16+
private $raas_helper= NULL;
1617

17-
public $api_helper = FALSE;
18+
public $api_helper = NULL;
1819

19-
public function __construct(ConfigFactoryInterface $config_factory) {
20-
parent::__construct($config_factory);
21-
22-
$this->raas_helper = new GigyaRaasHelper();
23-
}
2420

2521
/**
2622
* Gets the configuration names that will be editable.
@@ -42,8 +38,10 @@ protected function getEditableConfigNames() {
4238
* @return array
4339
*/
4440
public function buildForm(array $form, FormStateInterface $form_state, GigyaHelperInterface $helper = NULL) {
45-
$config = $this->config('gigya_raas.fieldmapping');
46-
$fieldmapping_config = json_encode($this->raas_helper->getFieldMappingConfig(), JSON_PRETTY_PRINT);
41+
42+
if ($this->raas_helper == NULL) {
43+
$this->raas_helper = new GigyaRaasHelper();
44+
}
4745

4846
if ($helper == NULL) {
4947
$this->api_helper = new GigyaHelper();
@@ -52,6 +50,10 @@ public function buildForm(array $form, FormStateInterface $form_state, GigyaHelp
5250
$this->api_helper = $helper;
5351
}
5452

53+
$config = $this->config('gigya_raas.fieldmapping');
54+
$fieldmapping_config = json_encode($this->raas_helper->getFieldMappingConfig(), JSON_PRETTY_PRINT);
55+
56+
5557
if (!$this->api_helper->checkEncryptKey()) {
5658
$messenger = \Drupal::service('messenger');
5759
$messenger->addWarning($this->t('Please go to Gigya\'s general settings to define a Gigya\'s encryption key.'));
@@ -126,6 +128,17 @@ public function getFormId() {
126128
public function validateForm(array &$form, FormStateInterface $form_state) {
127129
parent::validateForm($form, $form_state);
128130

131+
if ($this->raas_helper == NULL) {
132+
$this->raas_helper = new GigyaRaasHelper();
133+
}
134+
135+
if ($helper == NULL) {
136+
$this->api_helper = new GigyaHelper();
137+
}
138+
else {
139+
$this->api_helper = $helper;
140+
}
141+
129142
/* Field mapping */
130143

131144
$fieldmapping_config = $form_state->getValue('gigya_fieldmapping_config');
@@ -212,6 +225,10 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
212225

213226
private function validateMappedUidFieldExists ($form_state, string $uid__field_mapping) {
214227

228+
if ($this->raas_helper == NULL) {
229+
$this->raas_helper = new GigyaRaasHelper();
230+
}
231+
215232
if (!empty($uid__field_mapping) and !$this->raas_helper->doesFieldExist($uid__field_mapping)) {
216233
$form_state->setErrorByName('fieldmapping', $this->t("The UID mapping field does not exist in your database.
217234
Therefore, it is necessary to create the field before proceeding"));

gigya_user_deletion/gigya_user_deletion.info.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ type: module
33
description: 'Allows permanently deleting users from Gigya and Drupal databases'
44
package: Gigya
55
configure: gigya.cron.form
6-
version: '1.8.1'
7-
core_version_requirement: ^8 || ^9 || ^10
6+
version: '1.9.0'
7+
core_version_requirement: ^8 || ^9 || ^10 || ^11
88
dependencies:
99
- gigya
1010
- gigya_raas

0 commit comments

Comments
 (0)