Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-02-2007, 12:10 PM
Junior Member
 
Posts: 6
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
Reply With Quote
  #2 (permalink)  
Old 03-02-2007, 05:34 PM
Zimbra Employee
 
Posts: 228
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!
Reply With Quote
  #3 (permalink)  
Old 03-05-2007, 08:58 AM
Junior Member
 
Posts: 6
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.