Hello,

I have three models: votes, items, votes_items, and users.

user_id is a foreign key in votes. What I would like to do is override the
doSelectJoinAll method in the items model so that, if a user is logged in,
it right joins the users' votes. My question is: how do I access the sfUser
object from within the model?

I was thinking of doing something like

public static function doSelectJoinAll(Criteria $c, $con = null)
{
  if (userloggedin)
  {
    add criteria to select his votes;
    add criteria to join the votes;
  }
}


How do I check for the userloggedin part within the model? Oh, and how would
I go about joining the votes using the intermediary table votes_items?

Thanks!

-- 

- Alex

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to