留言板

How to have custom users in Liferay?

Arturas Masaitis,修改在11 年前。

How to have custom users in Liferay?

New Member 帖子: 2 加入日期: 12-12-24 最近的帖子
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,修改在11 年前。

RE: How to have custom users in Liferay?

New Member 帖子: 2 加入日期: 12-12-24 最近的帖子
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,修改在11 年前。

RE: How to have custom users in Liferay?

Liferay Master 帖子: 658 加入日期: 10-6-15 最近的帖子
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,修改在11 年前。

RE: How to have custom users in Liferay?

Liferay Master 帖子: 522 加入日期: 11-8-29 最近的帖子
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,修改在11 年前。

RE: How to have custom users in Liferay?

Regular Member 帖子: 145 加入日期: 11-1-31 最近的帖子
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.