Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if last name is anonymous - replace lastname variable from response #171

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions controllers/front/ListComments.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public function display()

if ($isLastNameAnonymous) {
$productComment['customer_name'] = $this->anonymizeName($productComment['customer_name']);
$productComment['lastname']= '...';
Copy link
Contributor

@matthieu-rolland matthieu-rolland Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does $productComment['customer_name'] contain ? is it the first name ? in this case we should concatenate customer_name and lastname before sending it to the anonymizeName method.

If it's just a name I guess it's fine 🤔

I ask this because I see the anonymizeName method does split the parameter with a space, as if expecting a name in two parts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm quite sure that if we want to improve Lastname anonymizing, we need to do it inside function anonymizeName (lines 96 - 112), or before calling it at line 73.

Copy link
Author

@mjamroz mjamroz Jul 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthieu-rolland customer_name contains first_name + last_name.

}

$productComment['customer_name'] = htmlentities($productComment['customer_name']);
Expand Down