论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Arturas Masaitis
How to have custom users in Liferay?
2012年12月23日 下午8:06
答复

Arturas Masaitis

等级: New Member

帖子: 2

加入日期: 2012年12月23日

最近的帖子

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?
2012年12月23日 下午8:10
答复

Arturas Masaitis

等级: New Member

帖子: 2

加入日期: 2012年12月23日

最近的帖子

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?
2012年12月23日 下午9:16
答复

Apoorva Prakash

等级: Liferay Master

帖子: 659

加入日期: 2010年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
Bart Simpson
RE: How to have custom users in Liferay?
2012年12月24日 上午4:35
答复

Bart Simpson

等级: Liferay Master

帖子: 524

加入日期: 2011年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
Gaurav Jain
RE: How to have custom users in Liferay?
2012年12月24日 上午5:03
答复

Gaurav Jain

等级: Regular Member

帖子: 146

加入日期: 2011年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.