Hey all,
I’m trying to get some info to display from web_user_attributes once a user is logged in and on a certain page, this is info that they have written into the DB on signup (street address, company, fullname), having modified the web-signup snippet to include the two new fields, im now struggling to get it out again. What im using is a small snippet containing a modified version of what i found here.
http://modxcms.com/dbapi-select.html and it looks a little like this
<?php
$userId = $modx->getLoginUserID();
$table = $modx->getFullTableName("web_user_attributes");
$info= $modx->db->select("fullname, streetaddress, country", $table, "internalKey = $userId" , "", "");
return $info;
?>
From what i can tell that should be pulling those three fields from that table and showing me the ones that belong to the current user (internalkey = userid), but it isnt, it returns "Resource id #19" or sometimes 13 or 14 or 15, I cant understand why its doing that. I am fairly poor when it comes to php and mysql and after a few hours of twiddling around with this I’ve run out of ideas on what to try next, can anyone lend a hand?