Show user password in email template

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Show user password in email template

Post by Odettes » Tue Sep 09, 2008 2:54 am

Hi!

I would like to create a email template to be used to send out to my custumers password when they have forget it.
I dont want to use the reset email template!
My problem is I cant get the nvelocity zyntax to work in the emailtemplate.
I have tried like this to write out the password without success:

${User.Password}!
$User.Password!
${Order.Password}!
$Order.Password!

Anyone who can help me to get the right zyntax?

Best regards, Thomas
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Re: Show user password in email template

Post by Odettes » Tue Sep 09, 2008 12:49 pm

OK, I found the answear, its not possible...
viewtopic.php?f=42&t=7404&p=30958&hilit ... ord#p30958

Since I autogenerate password for my customers it gives me problem, I guess I have to store the password uncrypted in a custom fiels somewhere to be able to send it out.
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Show user password in email template

Post by mazhar » Wed Sep 10, 2008 2:28 am

Yes you can place it in some file or may create some db table

User avatar
nickc
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Thu Nov 29, 2007 3:48 pm

Re: Show user password in email template

Post by nickc » Thu Sep 11, 2008 10:00 am

Able has a place to store user specific details: UserSettings
Here's a little snippet for adding a name/value pair like that:

Code: Select all

                string query = String.Format("UserId = {0} and FieldName = '{1}' and FieldValue = '{2}'", user.UserId, "PlainTextPassword", strPlainTextPassword);
                if (UserSettingDataSource.CountForCriteria(query) == 0)
                {
                    UserSetting us = new UserSetting();
                    us.UserId = user.UserId;
                    us.FieldName = "PlainTextPassword";
                    us.FieldValue = strPlainTextPassword;
                    us.Save();
                }
then you can access with:

Code: Select all

            UserSettingCollection usersettings = new UserSettingCollection();
            usersettings = UserSettingDataSource.LoadForUser(user.UserId);
            foreach (UserSetting setting in usersettings)
            {
                if ((setting.FieldName == "PlainTextPassword")

                ...

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Show user password in email template

Post by mazhar » Fri Sep 12, 2008 1:32 am

Yes User Settings is very good location to store user related information, you can use it as well.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Show user password in email template

Post by jmestep » Fri Sep 12, 2008 7:34 am

Not exactly related to this,but would the user settings be a better place to store a customer's access to certain products rather than putting them into a particular group? For example, only certain users can view certain products.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Show user password in email template

Post by mazhar » Fri Sep 12, 2008 9:50 pm

Yes it could be used

Post Reply