Hi Olly, Thanks a lot.. It's working :)
On Sep 15, 4:29 pm, Oliver Jackson <ojack...@valleyt.co.uk> wrote: > Avani wrote: > > Hello Everyone, > > > I have one common class for my own functions and I have stored it in > > lib/common.class.php > > > My problem is, how to get current login userid from that class? > > > I tried > > 1. $this->getUser()->getProfile()->getUserId(); > > 2. $sf_user->getProfile()->getUserId(); > > Try: > > sfContext::getInstance()->getUser()->getProfile()->getUserId(); > > Olly > > -- > Oliver Jackson - Senior Developer > Valley Technology - +44 (0)131 553 0412 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---