Foros de discusión

import users into liferay database by sql import statements

Rahul Chaturvedi, modificado hace 15 años.

import users into liferay database by sql import statements

New Member Mensajes: 6 Fecha de incorporación: 26/03/09 Mensajes recientes
We need to create a batch process which would run separately and will import the users from an external system into liferay.
1. What we want is to create sql import statements that will insert the data into liferay database (we have pointed liferay 5.1.2 to a MySQL database) And then the users should be become the part of this liferay.

Could you please let me know what all tables needs to be updated for the same. As there must be multiple tables that needs to be updated if we import a user (one of them is User_ )
We would like to know the sql statements by which we can accomplish this.

2. Another information we require to know is how can this aforementioned import be done so that user is able to login in liferay with the same password present in external system. So in the sql statements do we need to give the cleartext value or encrypted value. Since we want liferay to save passwords in encrypted format so the security concern is addressed.
thumbnail
Manish Kumar Gupta, modificado hace 15 años.

RE: import users into liferay database by sql import statements

Liferay Master Mensajes: 535 Fecha de incorporación: 16/05/08 Mensajes recientes
I am just giving you another approach. Since, you are fetching data from an external system, you can use Liferay API to create users. This way, you will not be required to write SQL statements, no password security concern and no need to know what all tables are involved.

My 2 cents.
Rahul Chaturvedi, modificado hace 15 años.

RE: import users into liferay database by sql import statements

New Member Mensajes: 6 Fecha de incorporación: 26/03/09 Mensajes recientes
Thanks Manish for your suggestion.

What we want is a separate batch process to take care of user imports. So creation of users using APIs in a batch would also do.

Could you please let me know the APIs (path to API) or sample code in case you have to which can take care of the task I want to achieve.
thumbnail
Manish Kumar Gupta, modificado hace 15 años.

RE: import users into liferay database by sql import statements

Liferay Master Mensajes: 535 Fecha de incorporación: 16/05/08 Mensajes recientes
See this file to get an idea on creating user by using LR api.

Let me know if you need any help.
Anónimo, modificado hace 14 años.

RE: import users into liferay database by sql import statements

Mensaje: 1
Hello manish,
I have the same need, could you please explain how to use this patch to import users using liferay API. this is an emergency please
Thanks
thumbnail
Lisa Simpson, modificado hace 14 años.

RE: import users into liferay database by sql import statements

Liferay Legend Mensajes: 2034 Fecha de incorporación: 5/03/09 Mensajes recientes
Manesh,

This really belongs in the Wiki!!
thumbnail
Richard Sezov, modificado hace 14 años.

RE: import users into liferay database by sql import statements

Regular Member Mensajes: 220 Fecha de incorporación: 7/02/07 Mensajes recientes
You can use Liferay's web services to insert users. This approach has been taken by many users.

Please see the Liferay Portal Administrator's Guide, pp 244-247 for instructions on accessing Liferay's web services. You can generate a client from the WSDL very easily using any modern IDE (I've done it on both Eclipse and NetBeans) or Apache's wsdl2java utility. From there, just call the web service via a batch process whenever you want to insert a user.
Alistair Oldfield, modificado hace 12 años.

RE: import users into liferay database by sql import statements

New Member Mensaje: 1 Fecha de incorporación: 21/02/11 Mensajes recientes
Hello,

We are also facing this issue, but using the API will not be enough. We are importing close to 1M users and this will take days.
Has anyone managed to accomplish this import using direct SQL statements (safely) into the DB?