registrationinfo.tpl password

Author Message

Jean-Luc Nguyen

Tuesday 31 May 2011 8:55:45 am

Hello,

When using user/register module, eZ sends an email to confirm login/email to new user, using registrationinfo.tpl. Searching on PHP side, eZ does not display the user password.

Most websites do that to confirm once the login/email/password. I might be wrong, but is it a willing behaviour?

Thanks,

http://www.acidre.com

Brandon Chambers

Tuesday 31 May 2011 1:27:31 pm

Can you explain a little more clear what you're trying to accomplish?

You want to display the actual password a user typed within the registration email or in the actual registration confirmation page?

It sounds like you might have looked into the default user/register module already. However, make sure to see if the password is available in plain text to the template (which I doubt) in the default user/register module. If so, then it's just a matter of finding the right variable available to the template. Otherwise, you need to code a separate module/view (or hack the kernel which I do not recommend).

 

Good luck, hope this helps.

Brandon Chambers
brandon@granitehorizon.com
blog: http://blog.divdesigns.com
Granite Horizon / http://granitehorizon.com

Jean-Luc Nguyen

Tuesday 31 May 2011 2:52:30 pm

Hi,

I just want to display the password in the email sent to the user after using default user/register module. After searching in the PHP code, I found that there is no $password variable set to the template.

I just need confirmation that the password is not displayed in the last versions of eZ.

Thanks,

http://www.acidre.com

Marko Žmak

Tuesday 31 May 2011 5:09:19 pm

In the template for the sent email (User/registrationinfo.tpl) you have two variables defined, $object and $user. The first is the ezcontentobject belonging to the registered user, and the second is the ezuser of the registered user.

I think they can both be used to display the password.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Jean-Luc Nguyen

Wednesday 01 June 2011 1:24:43 am

Hi,

I guess the default registrationinfo.tpl needs to be updated, the $user variable does not contain any password, except password_hash, which is standard.

Thanks for your answer.

http://www.acidre.com

Marko Žmak

Wednesday 01 June 2011 1:36:06 am

"

Hi,

I guess the default registrationinfo.tpl needs to be updated, the $user variable does not contain any password, except password_hash, which is standard.

"

Does the $object variable maybe contain the password?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Jean-Luc Nguyen

Wednesday 01 June 2011 1:48:21 am

"
"

Hi,

I guess the default registrationinfo.tpl needs to be updated, the $user variable does not contain any password, except password_hash, which is standard.

"

Does the $object variable maybe contain the password?

"

Nop, the password cannot be shown, as it is encrypted in the DB.

http://www.acidre.com

Brandon Chambers

Wednesday 01 June 2011 9:42:32 am

Then you might consider taking the default registration module and hack it. More specifically I mean create a new extension for the new module with proper templates and some PHP code to intercept the password in plain text and as a hash for the DB transaction.

 

Hope this helps.

Brandon Chambers
brandon@granitehorizon.com
blog: http://blog.divdesigns.com
Granite Horizon / http://granitehorizon.com

Peter Keung

Wednesday 01 June 2011 10:42:39 am

If this template is fired from user/register, then you might also have the password available in a POST variable.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Jean-Luc Nguyen

Wednesday 01 June 2011 1:15:56 pm

Hi,

Thanks for your answers. Actually, I know how to hack code to get the password or create a custom module based on user/register, but I was thinking that it was strange that default eZ behaviour would not send password at the registration step, using user/register.

Thanks again.

http://www.acidre.com

Brandon Chambers

Wednesday 01 June 2011 1:34:38 pm

True that it might be considered strange, but also consider it to be a built-in security feature that the password is not available in a transition type of action on the server (form submit to email notification). One less point if exploitation is better than storing the plain-text password in several locations where it could be exploited (sever memory, database, within the script itself and possible vulnerable to XSS not likely..but still possible).

I could be wrong but give it a shot and good luck. :)

Brandon Chambers
brandon@granitehorizon.com
blog: http://blog.divdesigns.com
Granite Horizon / http://granitehorizon.com

Marko Žmak

Wednesday 01 June 2011 5:08:27 pm

Actually, now that I thing about it... the $password variable is defined in user/registrationinfo.tpl template and it contains the user's password.

I remember using it many times and I just tested it on a 4.4 installation.

Also, this variable is used in design/standard/templates/user/registrationinfo.tpl.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Brandon Chambers

Friday 03 June 2011 2:52:46 pm

Nice...I'll have to remember this.

Brandon Chambers
brandon@granitehorizon.com
blog: http://blog.divdesigns.com
Granite Horizon / http://granitehorizon.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 23:48:42
Script start
Timing: Jan 29 2025 23:48:42
Module start 'layout'
Timing: Jan 29 2025 23:48:42
Module start 'content'
Timing: Jan 29 2025 23:48:42
Module end 'content'
Timing: Jan 29 2025 23:48:42
Script end

Main resources:

Total runtime0.0129 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0036 588.1328151.2109
Module start 'layout' 0.00360.0018 739.343836.6563
Module start 'content' 0.00540.0062 776.0000110.1719
Module end 'content' 0.01160.0012 886.171953.9766
Script end 0.0128  940.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.001914.9924140.0001
Check MTime0.00107.5240140.0001
Mysql Total
Database connection0.00053.919610.0005
Mysqli_queries0.001813.898530.0006
Looping result0.00000.070510.0000
Template Total0.00097.010.0009
Template load0.00075.582710.0007
Template processing0.00021.377610.0002
Override
Cache load0.00053.873310.0005
General
dbfile0.003124.457780.0004
String conversion0.00000.037140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs