$user = $User->findBy('user_code', $uc);
\
Where, please, is there an explanation of how to access the contents of $user?
I have no problem with using var_dump to see what I get. What I don't know how to do is to access a given element of it, such as the contents of a column.
From the var_dump that I got, it appears that what is returned is a single dimensioned array that contains an object., which is the rest of the data.
I figured that it would be more beneficial to more people if, rather than to ask for just what I need for this occasion, that I ask how to get all the elements that are returned. Better yet, it has to be documented somewhere, so a pointer to the documentation would be the greatest help.
Normally you would get the available column names with
$user->getContentColumns();
-> see a scaffolded listing view. It's used there to construct the header of the table
And the value of any individual column you can get by the name, like:
echo $user->name;
But it might be that your result contains more than one row (which you will have to loop through I guess).
If you want to find just one user you should use:
$user = $User->findFirstBy('user_code', $uc);
Maybe you're looking for
$User->getAttributes();
or
$User->getContentColumns();
1 to 5 of 5