Forums / Setup & design / How to print out the user account email ?

How to print out the user account email ?

Author Message

laurent le cadet

Tuesday 12 July 2005 1:33:22 am

Hi,
I created a extand user accountwith several attributes and a user account attribute.

I can't manage to print the email of this attribute (which must be visible for all users).

I tried most of the methods without any result.

Someone can help me ?

Thank.

Laurent

Eivind Marienborg

Tuesday 12 July 2005 1:42:28 am

{$node.object.data_map.user_account.content.email}

This will give you the user account email adress in node, where the user account has identifier user_account. You might have to change it to suit your needs.

laurent le cadet

Tuesday 12 July 2005 2:04:43 am

Hi Eivind,

Thanks for replying but it doesn't work for me.

In fact I made an extension to make 2 differents kind of users able to register.

The module is a basic copy/paste of kernel/user and I rename it ancien_eleve.

That's where I am !

Eivind Marienborg

Tuesday 12 July 2005 2:59:22 am

Could you give an example of what code you already have tried to display the email?

Steve P

Tuesday 12 July 2005 3:15:42 am

Not being funny, did you do a fetch for your user?

Steve

laurent le cadet

Tuesday 12 July 2005 5:28:33 am

I tried :

{$content_version.data_map.user_account.content.email}
{$node.object.data_map.user_account.content.email}
{$node.contentobject_version_object.creator.data_map.user_account.content.email}

:(

Eivind Marienborg

Tuesday 12 July 2005 5:33:51 am

Would you mind pasting the entire template code here? It might be easier to resolve your problem if we can see the code in it's natural surroundings :)

laurent le cadet

Tuesday 12 July 2005 5:39:31 am

the template is really basic :

<div class="content-view-full">
    <div class="class-article">

        <h1>{attribute_view_gui attribute=$node.object.data_map.civilite} {attribute_view_gui attribute=$node.object.data_map.nom} {section show=$node.object.data_map.nom_marital.has_content}(n&eacute;e {attribute_view_gui attribute=$node.object.data_map.nom_marital}){/section} {attribute_view_gui attribute=$node.object.data_map.prenom}</h1>
        {section show=$node.object.data_map.photo.content}
            <div class="attribute-image">
                {attribute_view_gui attribute=$node.object.data_map.photo alignment=right image_class=medium}
            </div>
        {/section}
		

             Promotion : {attribute_view_gui attribute=$node.object.data_map.promotion}
			 <br />
			 <br />
			 <b>Informations personnelles</b>
			 <br />
			 Date de naissance : {attribute_view_gui attribute=$node.object.data_map.date_naissance}<br />
			 Lieu de naissance : {attribute_view_gui attribute=$node.object.data_map.lieu_naissance}<br />
			 Adresse : {attribute_view_gui attribute=$node.object.data_map.adresse}<br />
			 Code postal : {attribute_view_gui attribute=$node.object.data_map.code_postal}<br />
			 Ville : {attribute_view_gui attribute=$node.object.data_map.ville}<br />
			 Pays {attribute_view_gui attribute=$node.object.data_map.pays}<br />
			 T&eacute;l&eacute;phone : {attribute_view_gui attribute=$node.object.data_map.telephone}<br />
			 Mobile : {attribute_view_gui attribute=$node.object.data_map.mobile}<br />
		


			 E-mail : ###That's where I want to print the user account email###
			 


			 <br />
			 <br />
			 <b>Informations professionelles</b>
			 <br />
			 Entreprise : {attribute_view_gui attribute=$node.object.data_map.entreprise}<br />
			 Adresse : {attribute_view_gui attribute=$node.object.data_map.adresse_entreprise}<br />
			 Code postal : {attribute_view_gui attribute=$node.object.data_map.code_postal_entreprise}<br />
			 Ville : {attribute_view_gui attribute=$node.object.data_map.ville_entreprise}<br />
			 Pays : {attribute_view_gui attribute=$node.object.data_map.pays_entreprise}<br />
			 E-mail entreprise : {attribute_view_gui attribute=$node.object.data_map.email_entreprise}<br />
			 T&eacute;l&eacute;phone : {attribute_view_gui attribute=$node.object.data_map.telephone_entreprise}<br />
			 Fax : {attribute_view_gui attribute=$node.object.data_map.fax}<br />
			 Site internet : {attribute_view_gui attribute=$node.object.data_map.site_internet}<br />
			 Secteur d'activit&eacute; : {attribute_view_gui attribute=$node.object.data_map.secteur}<br />
			 Profil : {attribute_view_gui attribute=$node.object.data_map.profil}<br />
			 Salaire : {attribute_view_gui attribute=$node.object.data_map.salaire} &euro;<br />
			 <br>
			 <br>

			 		        {section show=$node.object.can_edit}
        <form method="post" action={"content/action/"|ezurl}>
        <input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
        <input class="button forum-edit-reply" type="submit" name="EditButton" value="{'Edit'|i18n('design/standard/node/view')}" />

        </form>
        {/section}<br>


        <div class="attribute-tipafriend">
          <p>
             <a href={concat('/content/tipafriend/',$node.node_id)|ezurl}>{"Tip a friend"|i18n("design/base")}</a>
          </p>
        </div>

    </div>
</div>

Eivind Marienborg

Tuesday 12 July 2005 5:50:30 am

What version eZ Publish are you running? {$node.object.data_map.user_account.content.email} should work on 3.6, at least..

laurent le cadet

Tuesday 12 July 2005 6:03:03 am

3.5.2

Eivind Marienborg

Tuesday 12 July 2005 6:05:33 am

Have you tried a {$node|attribute(show)} to see the list of all attributes?

laurent le cadet

Tuesday 12 July 2005 6:13:27 am

yes but only the 3 titles are printed the attributes are not listing (!!)

Eivind Marienborg

Tuesday 12 July 2005 6:24:23 am

What template are you overriding with this?

laurent le cadet

Tuesday 12 July 2005 6:27:40 am

the node/view/full.tpl

Eivind Marienborg

Tuesday 12 July 2005 6:33:16 am

Well, then I'm all outta ideas. Anyone else?

Steve P

Tuesday 12 July 2005 6:45:18 am

Can you post the output from {$node|attribute(show)}?

laurent le cadet

Tuesday 12 July 2005 7:05:12 am

wow !

here's some content :

Attribute Type Value 
node_id string 372 
parent_node_id string 316 
main_node_id string 372 
contentobject_id string 474 
contentobject_version string 2 
contentobject_is_published string 1 
depth string 3 
sort_field string 2 
sort_order string 0 
priority string 0 
modified_subnode string 1121091513 
path_string string '/1/5/316/372/' 
path_identification_string string 'utilisateurs/anciens_eleves/le_cadet_laurent' 
remote_id string '73f01ca8fd46dbf93935905b778adf3d' 
is_hidden string 0 
is_invisible string 0 
name string 'Le Cadet Laurent' 
data_map array Array(28) 
>civilite object[ezcontentobjectattribute] Object 
>nom object[ezcontentobjectattribute] Object 
>nom_marital object[ezcontentobjectattribute] Object 
>prenom object[ezcontentobjectattribute] Object 
>promotion object[ezcontentobjectattribute] Object 
>date_naissance object[ezcontentobjectattribute] Object 
>lieu_naissance object[ezcontentobjectattribute] Object 
>adresse object[ezcontentobjectattribute] Object 
>code_postal object[ezcontentobjectattribute] Object 
>ville object[ezcontentobjectattribute] Object 
>pays object[ezcontentobjectattribute] Object 
>telephone object[ezcontentobjectattribute] Object 
>mobile object[ezcontentobjectattribute] Object 
>entreprise object[ezcontentobjectattribute] Object 
>adresse_entreprise object[ezcontentobjectattribute] Object 
>code_postal_entreprise object[ezcontentobjectattribute] Object 
>ville_entreprise object[ezcontentobjectattribute] Object 
>pays_entreprise object[ezcontentobjectattribute] Object 
>email_entreprise object[ezcontentobjectattribute] Object 
>telephone_entreprise object[ezcontentobjectattribute] Object 
>fax object[ezcontentobjectattribute] Object 
>site_internet object[ezcontentobjectattribute] Object 
>secteur object[ezcontentobjectattribute] Object 
>profil object[ezcontentobjectattribute] Object 
>salaire object[ezcontentobjectattribute] Object 
>photo object[ezcontentobjectattribute] Object 
>compte_utilisateur object[ezcontentobjectattribute] Object 
>non_email object[ezcontentobjectattribute] Object 
object object[ezcontentobject] Object 
>id string 474 
>section_id string 9 
>owner_id string 14 
>contentclass_id string 31 
>name string 'Le Cadet Laurent' 
>is_published string 0 
>published string 1121090437 
>modified string 1121091513 
>current_version string 2 
>status string 1 
>remote_id string '73f01ca8fd46dbf93935905b778adf3d' 
>current object[ezcontentobjectversion] Object 
>versions array Array(3) 
>author_array array Array(2) 
>class_name string 'Ancien élève' 
>content_class object[ezcontentclass] Object 
>contentobject_attributes array Array(28) 
>owner object[ezcontentobject] Object 
>related_contentobject_array array Array(0) 
>related_contentobject_count string 0 
>reverse_related_contentobject_array array Array(0) 
>reverse_related_contentobject_count string 0 
>can_read boolean true 
>can_create boolean true 
>can_create_class_list array Array(3) 
>can_edit boolean true 
>can_translate boolean true 
>can_remove boolean false 
>can_move boolean true 
>data_map array Array(28) 
>main_parent_node_id string 316 
>assigned_nodes array Array(1) 
>parent_nodes array Array(1) 
>main_node_id string 372 
>main_node object[ezcontentobjecttreenode] Object 
>default_language string 'fre-FR' 
>content_action_list boolean false 
>class_identifier string 'ancien_eleve' 
>class_group_id_list array Array(1) 
>match_ingroup_id_list boolean false 
subtree array Array(0) 
children array Array(0) 
children_count string 0 
contentobject_version_object object[ezcontentobjectversion] Object 
>id string 1215 
>contentobject_id string 474 
>creator_id string 474 
>version string 2 
>status string 1 
>created string 1121091502 
>modified string 1121091502 
>workflow_event_pos string 0 
>user_id string 0 
>creator object[ezcontentobject] Object 
>name string 'Le Cadet Laurent' 
>version_name string 'Le Cadet Laurent' 
>main_parent_node_id string 316 
>contentobject_attributes array Array(28) 
>related_contentobject_array array Array(0) 
>reverse_related_object_list array Array(0) 
>parent_nodes array Array(1) 
>can_read boolean false 
>data_map array Array(28) 
>node_assignments array Array(1) 
>contentobject object[ezcontentobject] Object 
>language_list array Array(1) 
>translation object[ezcontentobjecttranslation] Object 
>translation_list array Array(0) 
>complete_translation_list array Array(1) 
>temp_main_node object[ezcontentobjecttreenode] Object 
sort_array array Array(1) 
>0 array Array(2) 
can_read boolean true 
can_create boolean true 
can_edit boolean true 
can_hide boolean false 
can_remove boolean false 
can_move boolean true 
creator object[ezcontentobject] Object 
>id string 474 
>section_id string 9 
>owner_id string 14 
>contentclass_id string 31 
>name string 'Le Cadet Laurent' 
>is_published string 0 
>published string 1121090437 
>modified string 1121091513 
>current_version string 2 
>status string 1 
>remote_id string 'd58b10a7ad30ed6e2315c4bde53dae65' 
>current object[ezcontentobjectversion] Object 
>versions array Array(3) 
>author_array array Array(2) 
>class_name string 'Ancien élève' 
>content_class object[ezcontentclass] Object 
>contentobject_attributes array Array(28) 
>owner object[ezcontentobject] Object 
>related_contentobject_array array Array(0) 
>related_contentobject_count string 0 
>reverse_related_contentobject_array array Array(0) 
>reverse_related_contentobject_count string 0 
>can_read boolean true 
>can_create boolean true 
>can_create_class_list array Array(3) 
>can_edit boolean true 
>can_translate boolean true 
>can_remove boolean false 
>can_move boolean true 
>data_map array Array(28) 
>main_parent_node_id string 316 
>assigned_nodes array Array(1) 
>parent_nodes array Array(1) 
>main_node_id string 372 
>main_node object[ezcontentobjecttreenode] Object 
>default_language string 'fre-FR' 
>content_action_list boolean false 
>class_identifier string 'ancien_eleve' 
>class_group_id_list array Array(1) 
>match_ingroup_id_list boolean false 
path array Array(2) 
>0 object[ezcontentobjecttreenode] Object 
>1 object[ezcontentobjecttreenode] Object 
path_array array Array(4) 
>0 integer 1 
>1 integer 5 
>2 integer 316 
>3 integer 372 
parent object[ezcontentobjecttreenode] Object 
>node_id string 316 
>parent_node_id string 5 
>main_node_id string 316 
>contentobject_id string 379 
>contentobject_version string 1 
>contentobject_is_published string 1 
>depth string 2 
>sort_field string 2 
>sort_order string 0 
>priority string 0 
>modified_subnode string 1121091513 
>path_string string '/1/5/316/' 
>path_identification_string string 'utilisateurs/anciens_eleves' 
>remote_id string 'da4d410a1966a453b4a14de489f3c69b' 
>is_hidden string 0 
>is_invisible string 0 
>name string 'Anciens élèves' 
>data_map array Array(2) 
>object object[ezcontentobject] Object 
>subtree array Array(1) 
>children array Array(1) 
>children_count string 1 
>contentobject_version_object object[ezcontentobjectversion] Object 
>sort_array array Array(1) 
>can_read boolean false 
>can_create boolean true 
>can_edit boolean false 
>can_hide boolean false 
>can_remove boolean false 
>can_move boolean false 
>creator object[ezcontentobject] Object 
>path array Array(1) 
>path_array array Array(3) 
>parent object[ezcontentobjecttreenode] Object 
>url string 'utilisateurs/anciens_eleves' 
>url_alias string 'utilisateurs/anciens_eleves' 
>class_identifier string 'user_group' 
>class_name string 'User group' 
>hidden_invisible_string string '-/-' 
>hidden_status_string string 'Visible' 
url string 'utilisateurs/anciens_eleves/le_cadet_laurent' 
url_alias string 'utilisateurs/anciens_eleves/le_cadet_laurent' 
class_identifier string 'ancien_eleve' 
class_name string 'Ancien élève' 
hidden_invisible_string string '-/-' 
hidden_status_string string 'Visible' 

Steve P

Tuesday 12 July 2005 7:45:48 am

Blimmy as they say over here ;-)

That "looks" correct to me - can't you print values with {$your_fetch_var.contentobject.civilite.value} for example?

eZ debug

Timing: Jan 18 2025 16:07:25
Script start
Timing: Jan 18 2025 16:07:25
Module start 'content'
Timing: Jan 18 2025 16:07:26
Module end 'content'
Timing: Jan 18 2025 16:07:27
Script end

Main resources:

Total runtime1.8929 sec
Peak memory usage4,096.0000 KB
Database Queries257

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.9609180.8281
Module start 'content' 0.00681.6458 769.7891759.0625
Module end 'content' 1.65250.2402 1,528.8516369.3047
Script end 1.8928  1,898.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.2309210.0002
Check MTime0.00150.0813210.0001
Mysql Total
Database connection0.00070.036910.0007
Mysqli_queries1.769393.46942570.0069
Looping result0.00300.15982550.0000
Template Total1.862598.420.9313
Template load0.00200.106220.0010
Template processing1.860598.289620.9303
Template load and register function0.00020.009310.0002
states
state_id_array0.00100.053410.0010
state_identifier_array0.00150.077320.0007
Override
Cache load0.00190.1013730.0000
Sytem overhead
Fetch class attribute can translate value0.00160.082540.0004
Fetch class attribute name0.00140.0719200.0001
XML
Image XML parsing0.00150.078840.0004
class_abstraction
Instantiating content class attribute0.00010.0034330.0000
General
dbfile0.00470.2487330.0001
String conversion0.00000.000330.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
15content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
18content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
19content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 59
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs