On Tue, Feb 20, 2001 at 01:03:52AM -0500, Ivan Makkaveyev wrote:
> Hello All!
>
> I'd like to reference TURBINE_USER from my application tables. The most
> natural way I suppose would be using USER_ID. But I cannot find methods to
> obtain it. What can I do? Adding additional attribute and using
> setPerm/getPerm is a workaround but is not effective. Using UserName is not
> a good solution either.
If you are willing to tie your app to the DB implementation of the
SecurityService then you can cast User objects to BaseObject and call
getPrimaryKeyAsInt() ...
(The reason there is no method in User to get the User ID is that other
implementations of the SecurityService may not have an autonomous
primary key for the user - e.g. in LDAP the user name is the primary
key).
--
Sean Legassick
[EMAIL PROTECTED]
Ek is 'n man: niks menslik is vreemd vir my nie
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]