Foren

Modifying UserLocalService to use an external Database for Users

Scott Wolfram, geändert vor 12 Jahren.

Modifying UserLocalService to use an external Database for Users

New Member Beiträge: 8 Beitrittsdatum: 20.05.11 Neueste Beiträge
I'm considering using a hook to feed user objects into an Liferay via an external database. I've noticed the tables have to primary keys / foreign keys so I don't plan put any user data into the _user table. Anybody have any thoughts on this?
thumbnail
Jan Gregor, geändert vor 12 Jahren.

RE: Modifying UserLocalService to use an external Database for Users

Regular Member Beiträge: 224 Beitrittsdatum: 20.10.10 Neueste Beiträge
Hi Scott,

I dont think that saving users in external data source will be a good idea. Maybe if you can describe the use case, which you need to implement, or reason for doing that, i can try to figure out alternative solution.

Regards,
Jan.
Scott Wolfram, geändert vor 12 Jahren.

RE: Modifying UserLocalService to use an external Database for Users

New Member Beiträge: 8 Beitrittsdatum: 20.05.11 Neueste Beiträge
Hi Jan,
There is an existing application with a user database that the new Liferay based application would compliment. Ultimately we'd like to be able to use and modify one single database of users rather then try to keep them in sync. So the idea was to modify UserLocalService to feed CRUD operations from the existing database of users. Do you have any thoughts on a better direction?
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Modifying UserLocalService to use an external Database for Users

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Scott Wolfram:
I'm considering using a hook to feed user objects into an Liferay via an external database. I've noticed the tables have to primary keys / foreign keys so I don't plan put any user data into the _user table. Anybody have any thoughts on this?


Bad idea. Although there are no database primary/foreign key definitions, the LR code certainly enforces them.

For your situation, I'd look at the LDAP stuff to use as an example. LDAP users are imported initially to create the necessary LR users and a sync process will import any updates into the LR users table.