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


LinkBack URL
About LinkBacks


