foreach works on that object still. So I don't see the problem:
$results = sfGuardUserPeer::doSelect(new Criteria());
And in the template:
getUsername() ?>
On Mon, Feb 7, 2011 at 8:17 PM, Javier Garcia wrote:
> Hi,
>
> when i do a sfGuardUserPeer::doSelect(new Criteria()), i get an object
>
It is useful to prevent html injection (and a few similar) attacks.
Imagine the following: someone registers as "username", and
then you create a user list page. If you'd simply output the name, his
name would be quite big, but with symfony's output escaping simply
echoing `$user->username` is safe
Hi,
when i do a sfGuardUserPeer::doSelect(new Criteria()), i get an object
like this:
object(sfOutputEscaperArrayDecorator)[114]
private 'count' => int 1
protected 'value' =>
array
0 =>
object(sfGuardUser)[108]
protected 'profile' => null
protected 'group