User information
The extra user information in WebGUI is not in the users table for optimisation purposes. To understand this report you should know the table structure of the users table and the userProfileData and userProfileField table stucture. (See here)
For the photo we are using a custom macro because we cannot get the url for the photo through the database. In the database we only have the storageId wich is not enought to build the correct url.
SQL:
SELECT
userName,
firstName,
middleName,
lastName,
photo,
userId
FROM
users
LEFT JOIN
userProfileData
USING (userId)
Template:
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
<tmpl_if session.var.adminOn>
<p><tmpl_var controls></p>
</tmpl_if>
<tmpl_if displayTitle>
<h2><tmpl_var title></h2>
</tmpl_if>
<tmpl_if description>
<tmpl_var description>
<p />
</tmpl_if>
<tmpl_if canDownload>
<a href="<tmpl_var downloadLink>">Download this data</a>
</tmpl_if>
<tmpl_if debugMode>
<ul>
<tmpl_loop debug_loop>
<li><tmpl_var debug.output></li>
</tmpl_loop>
</ul>
</tmpl_if>
<table width="100%" cellspacing="0" cellpadding="2" style="border: 1px solid black;">
<tr>
<td class="tableData">userName</td>
<td class="tableData">firstName</td>
<td class="tableData">middleName</td>
<td class="tableData">lastName</td>
<td class="tableData">photo</td>
</tr>
<tmpl_loop rows_loop>
<tr>
<td class="tableData"><tmpl_var row.field.userName.value></td>
<td class="tableData"><tmpl_var row.field.firstName.value></td>
<td class="tableData"><tmpl_var row.field.middleName.value></td>
<td class="tableData"><tmpl_var row.field.lastName.value></td>
<td class="tableData">
^UserProfileField(photo,<tmpl_var row.field.userId.value>);
</td>
</tr>
</tmpl_loop>
</table>
<tmpl_if pagination.pageCount.isMultiple>
<div class="pagination">
<tmpl_var pagination.previousPage> <tmpl_var pagination.pageList.upTo20> <tmpl_var pagination.nextPage>
</div>
</tmpl_if>
Note:The userprofiling system is altered in WebGUI 7.4.x. This SQLReport is for 7.4+ only!
| userName | firstName | lastName | photo |
| Visitor | ^UserProfileField(photo,1); | ||
| Admin | admin | ^UserProfileField(photo,3); | |
| joeri | Joeri | de Bruin | ^UserProfileField(photo,7FPsAtEiWAC18SdOVD1iTA); |
| arjan | ^UserProfileField(photo,eX91lRy0v99BGUXLRnPfrw); | ||
| gredenz | ^UserProfileField(photo,kpbZPBu2-5Cm9QZLPgkLsw); | ||
| torque | ^UserProfileField(photo,aT7Cd9rlKlfxSRkbv5EIOg); | ||
| jgallego | ^UserProfileField(photo,NFZ9MdpB6H7gOvmZMXRJkg); | ||
| estivenrpo | ^UserProfileField(photo,SsGiaKSwcSE3BYIjpuQS6w); | ||
| william | ^UserProfileField(photo,wjVkdbsLKeT4o0WXBeSt3A); | ||
| SHEETAL | ^UserProfileField(photo,6jkNkReULEE3vpWX01JNDQ); | ||
| cjalain | ^UserProfileField(photo,JhJq5-3KjU2T7Ytr6laPMQ); | ||
| len | ^UserProfileField(photo,VrJbm5hQ9bjZxClIMnf6KA); | ||
| tineke | Tineke | Roegiers | ^UserProfileField(photo,-biSujkwoANKHpNCFqf4-Q); |
| rory | Rory | Zweistra | ^UserProfileField(photo,VvfMZDbg9a45jMwVOeBycg); |
| demartin | ^UserProfileField(photo,-WYGsY9x_shw1ysMzhEtWw); | ||
| ian | ^UserProfileField(photo,vxmI7voDyQ-ltW-aRXUT2g); | ||
| mcarring | ^UserProfileField(photo,2_h4UE0w-0JA4Zdn20L_uQ); | ||
| bart | ^UserProfileField(photo,VCdZt-EJtLB5k4BgXXEyAw); | ||
| barsamj | ^UserProfileField(photo,XqC2UaaS3SCbI3XoOEA9iQ); | ||
| hoan | ^UserProfileField(photo,T7YQ44UpWywsOemIdJerAg); | ||
| vinayv | ^UserProfileField(photo,UkdifyICSKBbRNOMXK3z4w); | ||
| zoran035 | ^UserProfileField(photo,JXELeSPD_LbXuVbBIbDMmQ); |