Results 1 to 4 of 4

Thread: Getting the current users name?

  1. #1
    Join Date
    Feb 2007
    Posts
    14

    Default Getting the current users name?

    I'm using acegi along side webflow and I wish to retrieve the current users name and bind it to a field in my object. I managed to do this when using MVC with the following.
    Code:
    String user = request.getSession().getAttribute("ACEGI_SECURITY_LAST_USERNAME").toString();
    I'm not sure if this was the best way of doing it but it worked ok. How do I go about doing this in webflow?

  2. #2
    Join Date
    Aug 2006
    Location
    Brooklyn
    Posts
    556

    Default

    You can write the same code in a FormAction deriving class.

  3. #3
    Join Date
    Feb 2007
    Posts
    14

    Default

    I am trying to do this using <bean-action>. I need to pass it an object that is/contains the Session or at least the attributes within the session. Does such an object exist within the flow and if so what is it called?

  4. #4

    Default

    You can make your own bean that takes httprequest as a parameter to a method. You can then do a bean action to call that method and do what you like with it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •