I was able to fix this problem with the following:
$criteria = new Criteria();
$criteria->add(sfGuardUserGroupPeer::USER_ID, $value);
$result = sfGuardUserGroupPeer::doSelect($criteria);
if (count($result) == 0 || $result[0]->getGroupId() != 1)
Having the column restriction on the query caused my group_id to be
placed in the user_id field - making it impossible for me to call with
getGroupId(). Removing the column restriction (increasing the mysql load
><) and then using $result[0]->getGroupId() resulted in expected
funcionality.
-Derek White
d-man97 wrote:
> Using symfony + guard plugin: http://pastebay.com/82233
>
> MySQL queries shown on the symfony debug bar appear to be correct &
> run through mysql query browser just fine.
>
> Whether I use an addSelectColumn or not, I just can't get the result
> into a usable variable to compare the associated group_id.
>
>
--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en.