Fórum

How to have custom users in Liferay?

Arturas Masaitis, modificado 11 Anos atrás.

How to have custom users in Liferay?

New Member Postagens: 2 Data de Entrada: 24/12/12 Postagens Recentes
Hi,

well to be honest, I'm really kinda confused with what and how Liferay is supposed to do, all I can recognize is that it's a CMS... So I have a task. I need to create a previously functioning site/information system in Liferay.

So the question probably is, how do I make Liferay use my default user types that I have created in my database scheme or java code? Like I have normal users and then I have Patients which extend them. How do I do all that stuff? Or I can't do that in Liferay at all and I should create new user types using Liferay to log in? But I still need the users for my system to work and do all the tasks with them?

For all other tasks I assume I will need to create portlets, right?

Yeah, I know I sound like a total noob, well I am a total noob, I've seen Liferay documentation, though I'm not looking to become a Liferay professional, I just have to create one site with it, so can anyone help me or hand me over some tutorials for what I need?

Thanks in advance.
Arturas Masaitis, modificado 11 Anos atrás.

RE: How to have custom users in Liferay?

New Member Postagens: 2 Data de Entrada: 24/12/12 Postagens Recentes
And I mean what about the registration, I want when a user registers through the liferay interface to my site, I want liferay to execute some java code so that the user is also created on my application database as well.... How can I achieve that?
thumbnail
Apoorva Prakash, modificado 11 Anos atrás.

RE: How to have custom users in Liferay?

Liferay Master Postagens: 658 Data de Entrada: 15/06/10 Postagens Recentes
Arturas Masaitis:
And I mean what about the registration, I want when a user registers through the liferay interface to my site, I want liferay to execute some java code so that the user is also created on my application database as well.... How can I achieve that?


Hello Arturas,

See this link. However, it is on LR 6.0, but the procedure is same.

Hope this will help.

Thanks and Regards,
Apoorva Prakash
thumbnail
Bart Simpson, modificado 11 Anos atrás.

RE: How to have custom users in Liferay?

Liferay Master Postagens: 522 Data de Entrada: 29/08/11 Postagens Recentes
So the question probably is, how do I make Liferay use my default user types that I have created in my database scheme or java code?

The way you should go forward assuming you want to do it the liferay way, would be to extend the Liferay's User model. There are option to do it with and EXT plugin, but I would be an overkill, if you could do it with adding some extra fields and match your schema, it would be suggested to do it with Expando (custom ) fields on Users

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen12-custom-fields-0
https://www.liferay.com/community/wiki/-/wiki/Main/Developing+with+Expando
http://www.liferay.com/community/wiki/-/wiki/Main/Expando
thumbnail
Gaurav Jain, modificado 11 Anos atrás.

RE: How to have custom users in Liferay?

Regular Member Postagens: 145 Data de Entrada: 31/01/11 Postagens Recentes
Yes, as Bart suggests, maybe you should use some mapping with expando for liferay users and your existing user types.

But your saying is bit confusing;
- it looks like you want to migrate your existing app into liferay
> Then, maybe you can write some code that will import your existing users to liferay and will map your existing user types to liferay roles or user-groups.


- If you want to keep liferay different, and also your another application different and want a synchronization between them (like you mentioned that on registration into liferay, user should also be created in your different app)
> Liferay provides a lot of capabilities for this. You can create UserModelListener with which you can achieve this.