Results 1 to 3 of 3

Thread: ZmAppCtxt.getUsername() and ls_last_username cookie

  1. #1
    phazer is offline Junior Member
    Join Date
    Mar 2007
    Posts
    6
    Rep Power
    8

    Default ZmAppCtxt.getUsername() and ls_last_username cookie

    Hi again everyone,

    I'm trying to get the current username in a Zimlet, by calling the getUsername method, which just calls this._appCtxt.getUsername(), get gets the value of the ls_last_username cookie. This was working on one machine I was testing with but not on another.

    I eventually traced the problem to the ls_last_username cookie not getting set on the machine where it wasn't working. After some more testing, I found that the cookie gets set if I login to Zimbra directly (by going to /zimbra/mail and using the Zimbra login form), but it does NOT get set when entering Zimbra via preauth.

    I'm entering Zimbra with an authtoken that I obtained with SOAP (as described in preauth.txt), not by passing an account and preauth value but I would guess the cookie does not get set in that case either.

    Is this a bug? If not, and this is by design, what is the proper way to make sure the cookie gets set? It appears that the cookie is supposed to be set since the getUsername() method depends upon it.

    I'm open to other ways to get the username, but the Zimlet whitepaper documents the getUsername() method as being able to return the current username -- which doesn't seem to work when using preauth.

    Thanks,
    -Christian

  2. #2
    schemers is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    9

    Default

    definitely sounds like a bug. The client gets the username from GetInfoAccount and shouldn't be relying on a cookie being set. Can you please file a bug?
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    phazer is offline Junior Member
    Join Date
    Mar 2007
    Posts
    6
    Rep Power
    8

    Default

    Quote Originally Posted by schemers View Post
    definitely sounds like a bug. The client gets the username from GetInfoAccount and shouldn't be relying on a cookie being set. Can you please file a bug?
    Done. http://bugzilla.zimbra.com/show_bug.cgi?id=15147

    I hope I filled out all the fields properly

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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