So I’ve made some progress. There’s some problem with the query they use to obtain user data. To obtain the user data from the various tables they use the following query (this can be found approximately on line 1826):
$extraFields = $modx->db->query("SELECT * FROM ".$this->CustomTable.", ".$web_user_attributes." WHERE ".$web_user_attributes.".`internalKey` = '".$modx->getLoginUserID()."' AND ".$this->CustomTable.".`internalKey` = '".$modx->getLoginUserID()."'");
Notice that they don’t use a JOIN. I have one extended attribute called address. The query result from the above query included an element in the result array called ’address’ but it had no value.
When I changed the query to this:
$extraFields = $modx->db->query('select * from modx_web_user_attributes inner join modx_web_user_attributes_extended on modx_web_user_attributes.internalKey = modx_web_user_attributes_extended.internalKey WHERE modx_web_user_attributes.internalKey = 12');
It included the address field from the custom table (in this case the custom table is the default modx_web_user_attributes_extended) with the correct value. I don’t know if this is a problem with the $modx->db class or with the way php handles the type of query they use.