I've checked through the archives but on the subject of accessing user
object details it suffers from a serious case of signal-to-noise defeat. My
question is simple and I'm feeling stupid that this morning I can't seem to
figure it out -- how does one access the currently-logged-in user's user
Id? Using data.getUser() one can get the username, password, etc. from the
om.security.User object but the interface doesn't support getting the user
ID.

I'm using this route as _very_ weak FK method by tagging a particular
object as created by user # X w/o the benefit of actual FK relationships
through Torque (b/c until the new 2.2 extend-user HOWTO gets near stable
I'm not touching that particular bees nest) i.e.

ObjA newA = new ObjA();
data.getParameters().setProperties(newA);
newA.setDateAdded(new Date());
newA.setAddedBy(data.getUser().getUserId());  <-- doesn't work
newA.save();

I've tried casting directly back to a TurbineUser but that throws a
ClassCastException ...

Thanks ...
-j

-------------------------------------------------
James Diggans
Bioinformatics Programmer
Gene Logic, Inc.
Phone: 301.987.1756
FAX: 301.987.1701



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to