Leon Messerschmidt wrote:
> Current in TurbineUserPeer there is code that prevents the USER_ID to be
> added to the Permanent storage
>
> if ( ! ( columnNames[j].equalsIgnoreCase( USER_ID_COLUMN )
> || columnNames[j].equalsIgnoreCase( OBJECT_DATA_COLUMN ) ))
> {
> // Add to storage
> }
>
> Would it be ok to remove the USER_ID_COLUMN restriction so that I can get a
> hold of the USER_ID with
>
> id = data.getUser().getPerm("USER_ID");
>
> Or is there some reason that I don't see for USER_ID to be excluded from the
> permanentStorage?
The reason for that is, that numerical USER_ID is specific to database
implementation of SecurityService/UserManager. In LDAP for example,
there are no such ids.
Applications that wish to be compatible with all Turbine configurations
they may be deployed in, should *not* depend on those numerical ids.
Use LOGIN_NAMEs instead. They are guaranteed to be unique.
Applications that don't care about being compatible shoud cast User to
BaseObject (TurbineUser extends it) and use getIdAsInt() or
getPrimaryKey()
or whatever it is called now, to get the id.
Rafal
--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]