Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Arturas Masaitis
How to have custom users in Liferay?
23 dicembre 2012 20.06
Risposta

Arturas Masaitis

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 23 dicembre 2012

Messaggi recenti

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
RE: How to have custom users in Liferay?
23 dicembre 2012 20.10
Risposta

Arturas Masaitis

Punteggio: New Member

Messaggi: 2

Data di Iscrizione: 23 dicembre 2012

Messaggi recenti

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?
Apoorva Prakash
RE: How to have custom users in Liferay?
23 dicembre 2012 21.16
Risposta

Apoorva Prakash

Punteggio: Liferay Master

Messaggi: 658

Data di Iscrizione: 15 giugno 2010

Messaggi recenti

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
Bart Simpson
RE: How to have custom users in Liferay?
24 dicembre 2012 4.35
Risposta

Bart Simpson

Punteggio: Liferay Master

Messaggi: 520

Data di Iscrizione: 29 agosto 2011

Messaggi recenti

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
Gaurav Jain
RE: How to have custom users in Liferay?
24 dicembre 2012 5.03
Risposta

Gaurav Jain

Punteggio: Regular Member

Messaggi: 141

Data di Iscrizione: 31 gennaio 2011

Messaggi recenti

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.