Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/ed407b4ac446715a#

Most of data, that can be added from Front-End has CreatedById column, that
stores ID of user, who created that record.

In all places we use LEFT JOIN to PortalUser table to speed up user data
retrieval. However we don't centrally use universal scheme for user data
display.
Here is the one, that I've developed on one of projects I was working on:

'CASE %1$s.CreatedById WHEN ' . USER_ROOT . ' THEN "root" WHEN ' .
USER_GUEST . ' THEN "Guest" ELSE IF(CONCAT(pu.FirstName, pu.LastName) <>
"", CONCAT(pu.FirstName, " ", pu.LastName), pu.Username) END'

Above SQL shows user's firstname & lastname only when they are filled and
shows username otherwise.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

  • No labels