File tree 2 files changed +2
-4
lines changed
Ui/Component/Customer/Form
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,11 @@ public function __construct(
39
39
public function getButtonData (): array
40
40
{
41
41
$ customerId = $ this ->getCustomerId ();
42
- $ customer = $ this ->customerRepository ->getById ($ customerId );
43
42
$ buttonData = [];
44
43
45
44
if ($ customerId
46
45
&& $ this ->authorization ->isAllowed ('Opengento_Gdpr::customer_erase ' )
47
- && $ this ->config ->isErasureEnabled ($ customer ->getWebsiteId ())
46
+ && $ this ->config ->isErasureEnabled ($ this -> customerRepository -> getById ( $ customerId ) ->getWebsiteId ())
48
47
&& $ this ->eraseCustomerChecker ->canCreate ($ customerId , 'customer ' )
49
48
) {
50
49
$ buttonData = [
Original file line number Diff line number Diff line change @@ -31,12 +31,11 @@ public function __construct(
31
31
public function getButtonData (): array
32
32
{
33
33
$ customerId = $ this ->getCustomerId ();
34
- $ customer = $ this ->customerRepository ->getById ($ customerId );
35
34
$ buttonData = [];
36
35
37
36
if ($ customerId
38
37
&& $ this ->authorization ->isAllowed ('Opengento_Gdpr::customer_export ' )
39
- && $ this ->config ->isExportEnabled ($ customer ->getWebsiteId ())) {
38
+ && $ this ->config ->isExportEnabled ($ this -> customerRepository -> getById ( $ customerId ) ->getWebsiteId ())) {
40
39
$ buttonData = [
41
40
'label ' => new Phrase ('Export Personal Data ' ),
42
41
'class ' => 'Export ' ,
You can’t perform that action at this time.
0 commit comments