ADDING LAST_NAME AND FIRST_NAME FIELDS TO THE USER ACCOUNTS TABLE - May 8th, 2011


If you’ve been frustrated by user accounts that are sorted by the user’s first name in the fullname field, or if you
wanted to add information fields to the user account table but didn’t know if you would break anything, take heart.

According to Chris Waddell at interactive Tools, “You can certainly replace the fullname field with first_name and
last_name fields in the accounts table. You can then output both fields in your viewer:



<?php echo $record['createdBy.first_name'] . " " . $record['createdBy.last_name'] ?>



You can also add these and any other fields to your ListPage Fields, sort by these added fields, and use them in viewers
the same way you’d use any other fields.

The Author of a record is currently pulled from the username field so this function should not be affected.

Don't forget to copy any name information from the fullname to the new first_name and last_name fields before you delete
the fullname field.



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service