[Skip to main content](#vessel-content)

#   Username in the Comments of the products

##

- **[vdevan](/forum/user/36155-vdevan "View vdevan's Profile")**
- [![vdevan's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36155-vdevan "View vdevan's Profile") Topic Author
- [ Offline](/forum/user/36155-vdevan)

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#200761](#200761) by [vdevan](/forum/user/36155-vdevan "View vdevan's Profile")  *[Username in the Comments of the products](/forum/42-vote/876780-username-in-the-comments-of-the-products#200761 "-- url of the page with the problem -- :   brahas.com  -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  Hi: The comment section uses &quot;username&quot; field for displaying the user who has commented. Since most people log in using Google+ which uses email as their username, the comment field displays the email address. Not a desirable option as we are not supposed to expose user emails. Is there a way to display &quot;name&quot; field instead of &quot;username&quot;? If there is a config or php changes required, please do let me know. I am sure this is something other user would have asked as well. as it is a security requirement these days to avoid spams. Thanks in advance for your help")* was created by *[vdevan](/forum/user/36155-vdevan "View vdevan's Profile")*

-- url of the page with the problem -- : [ brahas.com](http://brahas.com)
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1

Hi:
The comment section uses "username" field for displaying the user who has commented. Since most people log in using Google+ which uses email as their username, the comment field displays the email address. Not a desirable option as we are not supposed to expose user emails. Is there a way to display "name" field instead of "username"? If there is a config or php changes required, please do let me know.
I am sure this is something other user would have asked as well. as it is a security requirement these days to avoid spams.
Thanks in advance for your help

- [ ![commentUsername.jpg](/forum/attachment/24246) ](/forum/attachment/24246 "...ntUsername.jpg") [ ](/forum/attachment/24246?download=1 "...ntUsername.jpg")

Last edit: 11 years 5 months ago by [vdevan](/forum/user/36155-vdevan "View vdevan's Profile"). Reason: english

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQyLXZvdGUvODc2NzgwLXVzZXJuYW1lLWluLXRoZS1jb21tZW50cy1vZi10aGUtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago [\#200764](#200764) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Username in the Comments of the products](/forum/42-vote/876780-username-in-the-comments-of-the-products#200764 "-- url of the page with the problem -- :   brahas.com  -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  Hi: The comment section uses &quot;username&quot; field for displaying the user who has commented. Since most people log in using Google+ which uses email as their username, the comment field displays the email address. Not a desirable option as we are not supposed to expose user emails. Is there a way to display &quot;name&quot; field instead of &quot;username&quot;? If there is a config or php changes required, please do let me know. I am sure this is something other user would have asked as well. as it is a security requirement these days to avoid spams. Thanks in advance for your help")*

Hi,

Please edit the file "components/com_hikashop/views/vote/view.html.php", function "listing()" and replace: Code:

$elts[$i] = new stdClass(); $elts[$i]-&gt;vote_comment = $hikashop_vote-&gt;vote_comment; $elts[$i]-&gt;vote_rating = $hikashop_vote-&gt;vote_rating; $elts[$i]-&gt;vote_pseudo = $hikashop_vote-&gt;vote_pseudo; $elts[$i]-&gt;username = $hikashop_vote-&gt;username; $elts[$i]-&gt;vote_id = $hikashop_vote-&gt;vote_id; $elts[$i]-&gt;vote_user_id = $hikashop_vote-&gt;vote_user_id; $elts[$i]-&gt;vote_useful = $hikashop_vote-&gt;vote_useful; $elts[$i]-&gt;total_vote_useful = 0;

By: Code:

$elts[$i] = clone($hikashop_vote); $elts[$i]-&gt;total_vote_useful = 0;

We updated the code on our end, this way it allow to only edit the view "vote / listing" and replace:
Code:

&lt;span class="hika_vote_listing_username"&gt;&lt;?php echo $elt[$i]-&gt;username; ?&gt; &lt;/span&gt;

By: Code:

&lt;span class="hika_vote_listing_username"&gt;&lt;?php echo $elt[$i]-&gt;name; ?&gt; &lt;/span&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQyLXZvdGUvODc2NzgwLXVzZXJuYW1lLWluLXRoZS1jb21tZW50cy1vZi10aGUtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[vdevan](/forum/user/36155-vdevan "View vdevan's Profile")**
- [![vdevan's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36155-vdevan "View vdevan's Profile") Topic Author
- [ Offline](/forum/user/36155-vdevan)

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 5 months ago [\#200807](#200807) by [vdevan](/forum/user/36155-vdevan "View vdevan's Profile")  Replied by *[vdevan](/forum/user/36155-vdevan "View vdevan's Profile")* on topic *[Username in the Comments of the products](/forum/42-vote/876780-username-in-the-comments-of-the-products#200807 "-- url of the page with the problem -- :   brahas.com  -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  Hi: The comment section uses &quot;username&quot; field for displaying the user who has commented. Since most people log in using Google+ which uses email as their username, the comment field displays the email address. Not a desirable option as we are not supposed to expose user emails. Is there a way to display &quot;name&quot; field instead of &quot;username&quot;? If there is a config or php changes required, please do let me know. I am sure this is something other user would have asked as well. as it is a security requirement these days to avoid spams. Thanks in advance for your help")*

Thanks Xavier. It worked like a charm.
Two things, what will happen if there is an upgrade. You mentioned that you have made the corrections from your end. I wasn't clear. so in future, the corrections will be in place?
Second, just for my own curiosity as I am not a php programmer, addition of following line would have also worked - right?
$elts[$i]-&gt;name = $hikashop_vote-&gt;name;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQyLXZvdGUvODc2NzgwLXVzZXJuYW1lLWluLXRoZS1jb21tZW50cy1vZi10aGUtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 5 months ago [\#200813](#200813) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Username in the Comments of the products](/forum/42-vote/876780-username-in-the-comments-of-the-products#200813 "-- url of the page with the problem -- :   brahas.com  -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  Hi: The comment section uses &quot;username&quot; field for displaying the user who has commented. Since most people log in using Google+ which uses email as their username, the comment field displays the email address. Not a desirable option as we are not supposed to expose user emails. Is there a way to display &quot;name&quot; field instead of &quot;username&quot;? If there is a config or php changes required, please do let me know. I am sure this is something other user would have asked as well. as it is a security requirement these days to avoid spams. Thanks in advance for your help")*

Hi,

Yes the line you wrote would have also worked ![:)](/media/kunena/emoticons/8.png ":)") But the given solution allow to have all the informations directly.

When updating/upgrading, if you have edited the view thanks to the menu Display &gt; Views (so a view override) so everything will work as expected.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQyLXZvdGUvODc2NzgwLXVzZXJuYW1lLWluLXRoZS1jb21tZW50cy1vZi10aGUtcHJvZHVjdHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.259 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
