Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Arturas Masaitis
How to have custom users in Liferay?
23. Dezember 2012 20:06
Antwort

Arturas Masaitis

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 23. Dezember 2012

Neue Beiträge

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. Dezember 2012 20:10
Antwort

Arturas Masaitis

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 23. Dezember 2012

Neue Beiträge

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. Dezember 2012 21:16
Antwort

Apoorva Prakash

Rang: Liferay Master

Nachrichten: 659

Eintrittsdatum: 15. Juni 2010

Neue Beiträge

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. Dezember 2012 04:35
Antwort

Bart Simpson

Rang: Liferay Master

Nachrichten: 524

Eintrittsdatum: 29. August 2011

Neue Beiträge

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. Dezember 2012 05:03
Antwort

Gaurav Jain

Rang: Regular Member

Nachrichten: 143

Eintrittsdatum: 31. Januar 2011

Neue Beiträge

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.