This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

how can i acces the user object?

Questions relating to sfGuardPlugin or other user management plugins

how can i acces the user object?

by Mathias » Tue Jul 05, 2011 1:47 pm

I think i have a major misunderstanding-issue with sfDoctrineGuardUser, sfDoctrineApply, sfForkedDoctrineApply.

The plugins are running, I can log in and out. No problem.

But now I want to access information about the logged in user. How can I retrieve the user object in other forms?
Mathias
Member
 
Posts: 85
Joined: Thu May 26, 2011 4:45 pm

Re: how can i acces the user object?

by Mathias » Tue Jul 05, 2011 3:52 pm

Ah, I think I have to sort of unserialize/revive it.

I did it this way:

Code: Select all
$user = Doctrine::getTable('contactperson')->find($_SESSION['symfony/user/sfUser/attributes']['sfGuardSecurityUser']['user_id']);


Is this the way to do it? Do I suck?
Mathias
Member
 
Posts: 85
Joined: Thu May 26, 2011 4:45 pm