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

#   How send user details in confirmed order email?

##

- **[oloccina](/forum/user/23273-oloccina "View oloccina's Profile")**
- [![oloccina's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23273.jpg)](/forum/user/23273-oloccina "View oloccina's Profile") Topic Author
- [ Offline](/forum/user/23273-oloccina)

Less More

- Posts: 224
- Thank you received: 8
-
-

8 years 6 months ago -  8 years 6 months ago [\#293218](#293218) by [oloccina](/forum/user/23273-oloccina "View oloccina's Profile")  *[How send user details in confirmed order email?](/forum/33-customers/894826-how-send-user-details-in-confirmed-order-email#293218 "Hello, I'd like to send the user details (username and password) to the customers in their &quot;confirmed order&quot; email I tried to copy this code from the user account email  but when I test it the username and password do not show; I only see username: password: with no data  I tested this by creating a new order for myself, changing it to &quot;confirmed&quot; and sending a notification to myself, maybe this is not the right way to test this though...  Other questions: 1 - is it possible to show the user password in these emails? By testing the &quot;user account&quot; email the password is always hidden, should I put $password = true; ?  2 - I am already sending user details via Joomla default configuration, can I deactivate the &quot;user account&quot; email or is still necessary? (I am trying to avoid users to receive to many messages)  Thank you!")* was created by *[oloccina](/forum/user/23273-oloccina "View oloccina's Profile")*

Hello,
I'd like to send the user details (username and password) to the customers in their "confirmed order" email
I tried to copy this code from the user account email
Code:

&lt;?php $password = false; if(HIKASHOP_J16){ jimport('joomla.application.component.helper'); $usersConfig = JComponentHelper::getParams( 'com_users' ); if ($usersConfig-&gt;get('sendpassword')) { $password = true; } }else{ $password = true; } ?&gt; &lt;?php if($password) echo JText::sprintf('YOU_CAN_LOG_IN_WITH');?&gt;&lt;br/&gt; &lt;?php echo JText::sprintf('HIKA_USERNAME').' : '.$data-&gt;username;?&gt;&lt;br/&gt; &lt;?php if($password) echo JText::sprintf('HIKA_PASSWORD').' : '.$data-&gt;password.'&lt;br/&gt;'; ?&gt;

but when I test it the username and password do not show; I only see
username:
password:
with no data

I tested this by creating a new order for myself, changing it to "confirmed" and sending a notification to myself, maybe this is not the right way to test this though...

**Other questions:**
1 - is it possible to show the user password in these emails? By testing the "user account" email the password is always hidden, should I put $password = true; ?

2 - I am already sending user details via Joomla default configuration, can I deactivate the "user account" email or is still necessary? (I am trying to avoid users to receive to many messages)

Thank you!

Last edit: 8 years 6 months ago by [oloccina](/forum/user/23273-oloccina "View oloccina's Profile").

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

8 years 5 months ago [\#293259](#293259) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How send user details in confirmed order email?](/forum/33-customers/894826-how-send-user-details-in-confirmed-order-email#293259 "Hello, I'd like to send the user details (username and password) to the customers in their &quot;confirmed order&quot; email I tried to copy this code from the user account email  but when I test it the username and password do not show; I only see username: password: with no data  I tested this by creating a new order for myself, changing it to &quot;confirmed&quot; and sending a notification to myself, maybe this is not the right way to test this though...  Other questions: 1 - is it possible to show the user password in these emails? By testing the &quot;user account&quot; email the password is always hidden, should I put $password = true; ?  2 - I am already sending user details via Joomla default configuration, can I deactivate the &quot;user account&quot; email or is still necessary? (I am trying to avoid users to receive to many messages)  Thank you!")*

Hi,

The username is in $data-&gt;cart-&gt;customer-&gt;username
However, you won't be able to give the password.
The password is encrypted when the user account is created. And it's impossible to decrypt.
So nowhere in your website do you have the unencrypted password.
When the user logs in, the password he provides is encrypted with the same algorithm and Joomla checks that this encrypted text corresponds to the encrypted text stored with the user account. So it's only possible to verify that a text corresponds to the password of the user account, and it's impossible to display the password of the user account.

It's only possible to get the password in the user details email because it is sent in the same process where the registration is being processed and thus the unencrypted password is still available in memory.

The following user(s) said Thank You: [oloccina](/forum/user/23273-oloccina "View oloccina's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTQ4MjYtaG93LXNlbmQtdXNlci1kZXRhaWxzLWluLWNvbmZpcm1lZC1vcmRlci1lbWFpbD90bXBsPW1hcmtkb3du) 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.046 seconds

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