留言板

Auto create users and give them a template?

Christopher Fremgen,修改在14 年前。

Auto create users and give them a template?

New Member 帖子: 3 加入日期: 10-2-3 最近的帖子
Hi,
Our university is considering switching from uPortal to Liferay for several reasons, however, I am running into some trouble.

These are my eventual short-term goals:

1) Define a basic template for users, and when their account is created they will be given that template based on their group. From this template, they can customize what they'd like their portal to look like.

2) We use LDAP/Active directory for authentication, and when a user firsts logs into the Liferay portal we want Liferay to automatically create their user profile, based on the template as said above.

We plan on making several groups: Students, faculty, alumni down the road, but I just want to get students done first.


Can you point me in the right direction? I've been trying to do this all day and avoid posting here due to my Liferay ignorance, but I have no other choice.

I am using Liferay CE 5.2.3 bundled with Tomcat 6.0


Thank you for any assistance!!
Christopher Fremgen
thumbnail
Jeffrey Handa,修改在14 年前。

RE: Auto create users and give them a template?

Liferay Master 帖子: 541 加入日期: 08-12-1 最近的帖子
Hi Christopher,

Welcome to the Liferay Community. One approach, to do what you're describing, would be to create lar files that contain the desired public and/or private layouts for each of the different groups (student, facutly, staff, alumni, prospects, etc.). Then override the addDefaultUserPublicLayouts and addDefaultUserPrivateLayouts methods in com.liferay.portal.events.ServicePreAction. This can be done in the ext environment.
Oliver Bayer,修改在14 年前。

RE: Auto create users and give them a template?

Liferay Master 帖子: 894 加入日期: 09-2-18 最近的帖子
Hi Christopher,

at our university of applied science we're having the same requirements. If you don't want to code and change these classes you can use a different approach.

Create usergroups (which are named the same as in LDAP) in the control panel and define page structures with "manage pages". If you start the import all users from this group get the previously defined site structure. There are some bugs regarding LDAP-import which you should fix so if you have any questions feel free to ask.

HTH Oli
Christopher Fremgen,修改在14 年前。

RE: Auto create users and give them a template?

New Member 帖子: 3 加入日期: 10-2-3 最近的帖子
Thank you both for the quick responses.

Which approach would be best? I don't mind messing with the code at all.

Are there any documents describing this process? I don't want to keep asking you guys step by step. If there is no such document, I will create one for future users like myself.

Thank you once again,
Christopher
Oliver Bayer,修改在14 年前。

RE: Auto create users and give them a template?

Liferay Master 帖子: 894 加入日期: 09-2-18 最近的帖子
Hi,

I can't say which approach is better than the other but mine is "easier" emoticon. Because if you use a lar file you have to create a group or community at first to export the site structure so it's a little overhead. So creating a usergroup, assigning a page structure to it and start the import is less work.

AFAIK there aren't any good documentations but maybe I searched for the wrong keywords. Maybe I can help you with some input (I'm not having the time to type a docu at the moment) to get a good docu for the community.

No problem ask again. I've invested a lot of time to get it to work and fix some bugs so you don't need to get through the same steps. Good to hear that you don't mind to code/ modify some classes. Logically the more complex your requirements are the more you have to tweak.

Oli
thumbnail
Jeffrey Handa,修改在14 年前。

RE: Auto create users and give them a template?

Liferay Master 帖子: 541 加入日期: 08-12-1 最近的帖子
Hi Christopher,

If Oliver's approach works for you, and you can map your LDAP User Groups to Liferay User Groups, then I think it's probably the right choice. If more complex logic is required, then you can always resort to the approach that I mentioned.

Also, please do consider documenting your approach and your results in the Liferay Community Wiki. As members of the Liferay Community, you can contribute new wiki articles and improve existing articles.