File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed
app/code/Magento/Customer
Controller/Adminhtml/Index Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ interface CustomerInterface extends \Magento\Framework\Api\CustomAttributesDataI
32
32
const DEFAULT_BILLING = 'default_billing ' ;
33
33
const DEFAULT_SHIPPING = 'default_shipping ' ;
34
34
const KEY_ADDRESSES = 'addresses ' ;
35
+ const DISABLE_AUTO_GROUP_CHANGE = 'disable_auto_group_change ' ;
35
36
/**#@-*/
36
37
37
38
/**
@@ -357,6 +358,23 @@ public function getAddresses();
357
358
*/
358
359
public function setAddresses (array $ addresses = null );
359
360
361
+ /**
362
+ * Get disable auto group change flag.
363
+ *
364
+ * @api
365
+ * @return int|null
366
+ */
367
+ public function getDisableAutoGroupChange ();
368
+
369
+ /**
370
+ * Set disable auto group change flag.
371
+ *
372
+ * @api
373
+ * @param int $disableAutoGroupChange
374
+ * @return $this
375
+ */
376
+ public function setDisableAutoGroupChange ($ disableAutoGroupChange );
377
+
360
378
/**
361
379
* Retrieve existing extension attributes object or create a new one.
362
380
*
Original file line number Diff line number Diff line change @@ -45,7 +45,10 @@ protected function _extractCustomerData()
45
45
}
46
46
47
47
if (isset ($ customerData ['disable_auto_group_change ' ])) {
48
- $ customerData ['disable_auto_group_change ' ] = (int )$ customerData ['disable_auto_group_change ' ];
48
+ $ customerData ['disable_auto_group_change ' ] = (int ) filter_var (
49
+ $ customerData ['disable_auto_group_change ' ],
50
+ FILTER_VALIDATE_BOOLEAN
51
+ );
49
52
}
50
53
51
54
return $ customerData ;
Original file line number Diff line number Diff line change @@ -237,6 +237,16 @@ public function getAddresses()
237
237
return $ this ->_get (self ::KEY_ADDRESSES );
238
238
}
239
239
240
+ /**
241
+ * Get disable auto group change flag.
242
+ *
243
+ * @return int|null
244
+ */
245
+ public function getDisableAutoGroupChange ()
246
+ {
247
+ return $ this ->_get (self ::DISABLE_AUTO_GROUP_CHANGE );
248
+ }
249
+
240
250
/**
241
251
* Set customer id
242
252
*
@@ -446,6 +456,17 @@ public function setAddresses(array $addresses = null)
446
456
return $ this ->setData (self ::KEY_ADDRESSES , $ addresses );
447
457
}
448
458
459
+ /**
460
+ * Set disable auto group change flag.
461
+ *
462
+ * @param int $disableAutoGroupChange
463
+ * @return $this
464
+ */
465
+ public function setDisableAutoGroupChange ($ disableAutoGroupChange )
466
+ {
467
+ return $ this ->setData (self ::DISABLE_AUTO_GROUP_CHANGE , $ disableAutoGroupChange );
468
+ }
469
+
449
470
/**
450
471
* {@inheritdoc}
451
472
*
You can’t perform that action at this time.
0 commit comments