Forums / Developer / registrationinfo.tpl password

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

eZ debug

Timing: Jan 17 2025 23:43:39
Script start
Timing: Jan 17 2025 23:43:39
Module start 'content'
Timing: Jan 17 2025 23:43:40
Module end 'content'
Timing: Jan 17 2025 23:43:40
Script end

Main resources:

Total runtime0.9100 sec
Peak memory usage4,096.0000 KB
Database Queries228

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.7109180.8438
Module start 'content' 0.00640.7773 768.5547763.2891
Module end 'content' 0.78380.1262 1,531.8438357.3125
Script end 0.9100  1,889.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4668210.0002
Check MTime0.00150.1647210.0001
Mysql Total
Database connection0.00100.105010.0010
Mysqli_queries0.798287.71062280.0035
Looping result0.00240.26622260.0000
Template Total0.882897.020.4414
Template load0.00230.248020.0011
Template processing0.880596.755220.4402
Template load and register function0.00030.034510.0003
states
state_id_array0.00140.156010.0014
state_identifier_array0.00200.223820.0010
Override
Cache load0.00220.2384690.0000
Sytem overhead
Fetch class attribute can translate value0.00120.134250.0002
Fetch class attribute name0.00130.1472170.0001
XML
Image XML parsing0.00230.252550.0005
class_abstraction
Instantiating content class attribute0.00010.0061260.0000
General
dbfile0.00310.3434480.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
13content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
13content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 47
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs