sionsmith wrote:
here is a simple example of what i have:
user = userManager.getUserByUsername(getRequest().getRemoteUser());
I've found there are times when I need basic info from the current user
object (which acegi stores in the session, so going to the DB is not
necessary), and times whe
here is a simple example of what i have:
user = userManager.getUserByUsername(getRequest().getRemoteUser());
mraible wrote:
>
> Yes.
>
> On 2/21/07, tonyl <[EMAIL PROTECTED]> wrote:
>>
>> Thanks Matt for the quick response.
>>
>> Yeah, I just want to get the current logged-in username. So, I
Yes.
On 2/21/07, tonyl <[EMAIL PROTECTED]> wrote:
Thanks Matt for the quick response.
Yeah, I just want to get the current logged-in username. So, I take it
getRequest().getRemoteUser() returns the username for the principal?
Tony
mraible wrote:
>
> If all you need to retrieve is the userna
Thanks Matt for the quick response.
Yeah, I just want to get the current logged-in username. So, I take it
getRequest().getRemoteUser() returns the username for the principal?
Tony
mraible wrote:
>
> If all you need to retrieve is the username,
> getRequest().getRemoteUser() should be suffici
If all you need to retrieve is the username,
getRequest().getRemoteUser() should be sufficient.
Matt
On 2/21/07, tonyl <[EMAIL PROTECTED]> wrote:
I need to get the current user and after searching forums and discussions and
examples about how to do this, I found that variations on the followin
I need to get the current user and after searching forums and discussions and
examples about how to do this, I found that variations on the following code
seem to be considered a good way to get the current user:
SecurityContext ctx = null;
Authentication auth = null;
if( ctx =