> I need to know how to take an email address (directly from an email > header) and get the actual UserId/PrincipalId from RT. I have the > address split out and now I just need an ID. I'm assuming that the > PrincipalId is the same thing as the Name field from the USERS Table. In > other words, I do NOT want to add an entire email address as a Ticket > watcher, I want the Name field from the USers Table (ie. instead of > [email protected] I want KFCrocker or whatever name correlates to > [email protected]). Thank you in advance.
Going into the database schema directly is a bad idea. Future upgrades can (and will) change the schema, breaking your customization. Use the REST interface instead. See http://wiki.bestpractical.com/view/REST Then, an HTTP GET of the URI '/REST/1.0/user/KFCrocker/show' should get you something like: id: user/217 Name: KFCrocker Password: ******** EmailAddress: [email protected] RealName: Ken Crocker Lang: en Privileged: 1 Disabled: 0 However, here you are querying by name, not by email address, so hopefully they all match. If they don't you aren't going to be able to do it reliably in a future-proof way without doing something you really don't want to do. Though really, I'm not sure why you'd want to do this in the first place. RT is quite happy to look up based on email address internally, you don't have to supply the ID when creating tickets and such, just an email address. -- -- ============================ Tom Lahti BIT Statement LLC (425)251-0833 x 117 http://www.bitstatement.net/ -- ============================ _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [email protected] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
