Thanks Bruno,
I had tried adding the selects, but when I add any of them (or all three), no users are found. If I use only the extUser select, xPDO crashes with a maximum nesting level error.
With all three, here's the resulting query (with no users found):
SELECT `id`, `username`, `password`, `cachepwd`, `class_key`, `active`, `remote_key`, `remote_data`, `hash_class`, `salt`, `primary_group`, `session_stale`, `sudo`,
`Profile`.`id` AS `Profile_id`, `Profile`.`internalKey` AS `Profile_internalKey`, `Profile`.`fullname` AS `Profile_fullname`, `Profile`.`email` AS `Profile_email`, `Profile`.`phone` AS `Profile_phone`, `Profile`.`mobilephone` AS `Profile_mobilephone`, `Profile`.`blocked` AS `Profile_blocked`, `Profile`.`blockeduntil` AS `Profile_blockeduntil`, `Profile`.`blockedafter` AS `Profile_blockedafter`, `Profile`.`logincount` AS `Profile_logincount`, `Profile`.`lastlogin` AS `Profile_lastlogin`, `Profile`.`thislogin` AS `Profile_thislogin`, `Profile`.`failedlogincount` AS `Profile_failedlogincount`, `Profile`.`sessionid` AS `Profile_sessionid`, `Profile`.`dob` AS `Profile_dob`, `Profile`.`gender` AS `Profile_gender`, `Profile`.`address` AS `Profile_address`, `Profile`.`country` AS `Profile_country`, `Profile`.`city` AS `Profile_city`, `Profile`.`state` AS `Profile_state`, `Profile`.`zip` AS `Profile_zip`, `Profile`.`fax` AS `Profile_fax`, `Profile`.`photo` AS `Profile_photo`, `Profile`.`comment` AS `Profile_comment`, `Profile`.`website` AS `Profile_website`, `Profile`.`extended` AS `Profile_extended`,
`userData`.`id` AS `userData_id`, `userData`.`userdata_id` AS `userData_userdata_id`, `userData`.`firstName` AS `userData_firstName`, `userData`.`lastName` AS `userData_lastName`, `userData`.`title` AS `userData_title`, `userData`.`company` AS `userData_company`, `userData`.`registrationDate` AS `userData_registrationDate`, `userData`.`category1` AS `userData_category1`, `userData`.`category2` AS `userData_category2`, `userData`.`category3` AS `userData_category3`
FROM `modx_users` AS `modUser`
JOIN `ext_user_data` `userData` ON modUser.id = userData.userdata_id
LEFT JOIN `modx_user_attributes` `Profile` ON `modUser`.`id` = `Profile`.`internalKey`
ORDER BY username ASC
Here's the schema, if that helps:
<?xml version="1.0" encoding="UTF-8"?>
<model package="extendeduser" baseClass="xPDOObject" platform="mysql" defaultEngine="MyISAM" tablePrefix="ext_" version="1.0.0">
<!-- extend the modUser class -->
<object class="extUser" extends="modUser">
<composite alias="Data" local="id" class="userData" foreign="userdata_id" cardinality="one" owner="local"/>
</object>
<object class="userData" table="user_data" extends="xPDOSimpleObject">
<field key="userdata_id" dbtype="int" precision="11" phptype="integer" null="false" attributes="unsigned"/>
<field key="firstName" dbtype="varchar" precision="50" phptype="string" null="true"/>
<field key="lastName" dbtype="varchar" precision="50" phptype="string" null="true"/>
<field key="title" dbtype="varchar" precision="100" phptype="string" null="true"/>
<field key="company" dbtype="varchar" precision="100" phptype="string" null="true"/>
<field key="registrationDate" dbtype="datetime" phptype="datetime"/>
<field key="category1" dbtype="varchar" precision="100" phptype="string" null="true"/>
<field key="category2" dbtype="varchar" precision="100" phptype="string" null="true"/>
<field key="category3" dbtype="varchar" precision="100" phptype="string" null="true"/>
<index alias="userdata_id" name="userdata_id" primary="false" unique="true" type="BTREE">
<column key="userdata_id" length="" collation="A" null="false"/>
</index>
<aggregate alias="User" class= "modUser" local="userdata_id" foreign="id" cardinality="one" owner="foreign"/>
</object>
</model>