Forums / General / Fetching User information

Fetching User information

Author Message

John Smith

Tuesday 04 May 2010 6:59:51 am

Hi guys,

I am working on a website in which users will register from the public website. Once registered, user can search other users that are already registered on the website.

The search result will display name of the registered user, few other selective information from user class in a list. Now in the search result list, name of the user will be a link, when clicked will display all the information related to that user.

Is that possible, what is the best method?

I tried few roles and policies, it seems current logged in user cannot access information related to other user.

John Smith

Tuesday 04 May 2010 12:26:03 pm

Anyone please....

Abdelkader RHOUATI

Tuesday 04 May 2010 1:15:11 pm

Hello,

Users under ezpublish are managed in the same ways that the content, except that it is in another root node that has the node_id equal to 5, and another section "Users".

So I advice you to create a new section called for exemple "Public Users" and in new profile you give access to module content > function read on the new created section.

I hope it's help you.

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

John Smith

Tuesday 04 May 2010 2:28:31 pm

Cheers Mate for your swift reply and help.

So according to you I should create new section "Public Users" and assign it to user-group containing all the users. What is best way to display the information for each user??

The only way I can see the user information is via

/user/edit/<object_id>

which probably not the right way? Is it possible to display the information like we use for content, something like

/content/view/full/<node_id>

Cheers,

Abdelkader RHOUATI

Tuesday 04 May 2010 2:57:43 pm

Anything you can do with content, you can do it with the users.

So to display the details of a user, you use content/view/full/[node_id] or even if you retrieve the node of the user, using his url alias (something like this : $user.url_alias )

Regrads

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

John Smith

Tuesday 04 May 2010 11:53:24 pm

Cheers Abdelkader,

It seems working. I can display the information for other users. Seems possible.

Following are the templates which are getting loaded.

extension/ezwebin/design/ezwebin/templates/node/view/full.tpl

design/standard/templates/content/datatype/view/ezuser.tpl

design/standard/templates/content/datatype/view/eztext.tpl

design/standard/templates/content/datatype/view/ezimage.tpl

To get the required information as I have changed the user class (added few other attributes), I think I need to override ezuser.tpl (datatype template) or do you suggest something else to display the user information.

Can it be done like we do the overrides for content objects like article, folder etc?

Abdelkader RHOUATI

Wednesday 05 May 2010 12:42:31 am

Hello

The answer is yes.

TKS, have a nice day ;)

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

John Smith

Wednesday 05 May 2010 12:58:55 am

Got it, something like, have to do manually in override.ini.append.php

[xx_user_full.tpl]
Source=node/view/full.tpl
MatchFile=xx_user_full.tpl
Subdir=templates
Match[class_identifier]=user
Match[section]=10 (ID of Public Users section)

Cheers,

eZ debug

Timing: Jan 18 2025 02:58:28
Script start
Timing: Jan 18 2025 02:58:28
Module start 'content'
Timing: Jan 18 2025 02:58:29
Module end 'content'
Timing: Jan 18 2025 02:58:29
Script end

Main resources:

Total runtime0.7867 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 589.1328180.8438
Module start 'content' 0.00800.6574 769.9766592.0625
Module end 'content' 0.66540.1213 1,362.0391341.0703
Script end 0.7866  1,703.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.5666210.0002
Check MTime0.00160.2057210.0001
Mysql Total
Database connection0.00090.113910.0009
Mysqli_queries0.711490.43032090.0034
Looping result0.00190.24552070.0000
Template Total0.757996.320.3789
Template load0.00180.227120.0009
Template processing0.756196.105720.3780
Template load and register function0.00010.016210.0001
states
state_id_array0.00070.094810.0007
state_identifier_array0.00130.159920.0006
Override
Cache load0.00150.1915530.0000
Sytem overhead
Fetch class attribute can translate value0.00130.164830.0004
Fetch class attribute name0.00100.121990.0001
XML
Image XML parsing0.00240.303230.0008
class_abstraction
Instantiating content class attribute0.00000.0020110.0000
General
dbfile0.00600.7647270.0002
String conversion0.00000.006330.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs