フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/24 3:18
RE: Trigger LDAP User Export on User Creation Jignesh Vachhani 2012/07/24 2:59
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/24 3:14
RE: Trigger LDAP User Export on User Creation Jignesh Vachhani 2012/07/24 3:18
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/24 3:44
RE: Trigger LDAP User Export on User Creation Jignesh Vachhani 2012/07/24 5:47
RE: Trigger LDAP User Export on User Creation Pinkesh Gandhi 2012/07/24 3:23
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/24 3:46
RE: Trigger LDAP User Export on User Creation Pinkesh Gandhi 2012/07/24 5:34
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/24 5:38
RE: Trigger LDAP User Export on User Creation Pinkesh Gandhi 2012/07/24 6:26
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/24 6:50
RE: Trigger LDAP User Export on User Creation Pinkesh Gandhi 2012/07/24 10:02
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/25 0:51
RE: Trigger LDAP User Export on User Creation Jignesh Vachhani 2012/07/25 1:13
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/25 1:25
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/25 1:58
RE: Trigger LDAP User Export on User Creation Jignesh Vachhani 2012/07/25 2:17
RE: Trigger LDAP User Export on User Creation Pinkesh Gandhi 2012/07/25 2:24
RE: Trigger LDAP User Export on User Creation Marc Grünewald 2012/07/25 4:24
RE: Trigger LDAP User Export on User Creation Jignesh Vachhani 2012/07/25 4:35
RE: Trigger LDAP User Export on User Creation Shiva Krish 2016/07/11 22:37
Marc Grünewald
Trigger LDAP User Export on User Creation
2012/07/24 3:18
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Hello everybody,

I configured LDAP in Liferay more or less sucessfully. The Import works perfect but I have a little Issue with the Export. We create Customer Users from a Custom Portlet and want to export that User to our OpenLDAP Server right away. Right now, I'd have to login with that user first in order for this Operation to be triggered. Is there any way to change that?

EDIT:

Also, is there a possibility to add Attributes to map? Like right now, only things like the screenname, mail, pw, uuid, etc. are available from the edit Screen. But what if I want to maybe map a Custom Field of a User to Attribute of my LDAP Server? e.g. I have a Custom Field called CustomerUser, which is a boolean value, and I want that value to be set, when Liferay imports Users via LDAP. Is this possible?

Best Regards

Marc
Jignesh Vachhani
RE: Trigger LDAP User Export on User Creation
2012/07/24 2:59
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 792

参加年月日: 2008/03/10

最近の投稿

you can visit very simple article to setup it :
http://www.liferaysolution.com/2012/07/ldap-import-export.html
Let me know if still you confused.
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/24 3:14
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Hello and thanks for the quick response. However, the Configuration is already done, it's just that the export Function is only triggered when I log in with the newly created User. But that's not what I want. I want Liferay to start the Export, right after I created the User with UserLocalServiceUtil.addUser(....).

Regards

Marc
Jignesh Vachhani
RE: Trigger LDAP User Export on User Creation
2012/07/24 3:18
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 792

参加年月日: 2008/03/10

最近の投稿

Yes it would export when you create new user if you have made export setting properly emoticon
Pinkesh Gandhi
RE: Trigger LDAP User Export on User Creation
2012/07/24 3:23
答え

Pinkesh Gandhi

ランク: Regular Member

投稿: 100

参加年月日: 2012/01/26

最近の投稿

Hi Marc,

In addition of Jignesh' reply, I would like to share one more thing with you.

The LDAP export will be triggered if and only if you add/update user's data in your portlet by using any one of the UserLocalServiceUtil/UserServiceUtil/ContactLocalServiceUtil/ContactServiceUtil.

I hope this may helps you.

Let me know if you have any query.
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/24 3:44
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Again, thanks for the fast reply. But I did configure it the way shown in your Post.
画像の固定

画像の固定

添付ファイル: attachment1_ldap.png (33.2k), attachment2_ldap.png (35.6k)
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/24 3:46
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Hello and thanks once more for the replies. I'm using UserLocalServiceUtil.addUser(...). BUt even after adding a User via the Control Panel, the User only gets exported on first login.

Regards

Marc
Pinkesh Gandhi
RE: Trigger LDAP User Export on User Creation
2012/07/24 5:34
答え

Pinkesh Gandhi

ランク: Regular Member

投稿: 100

参加年月日: 2012/01/26

最近の投稿

Hi,

Please make sure that you have checked the check box for Enable option under Authentication - LDAP as shown in following image.
画像の固定

添付ファイル: configure.JPG (21.2k)
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/24 5:38
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Hello,

well "Enabled" is already checked. Any other Ideas?

Regards

Marc
Jignesh Vachhani
RE: Trigger LDAP User Export on User Creation
2012/07/24 5:47
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 792

参加年月日: 2008/03/10

最近の投稿

Marc

I think there is some problem in User DN for export section.

Which User DN you are using ?
Pinkesh Gandhi
RE: Trigger LDAP User Export on User Creation
2012/07/24 6:26
答え

Pinkesh Gandhi

ランク: Regular Member

投稿: 100

参加年月日: 2012/01/26

最近の投稿

Can you please debug code and please verify that on calling UserLocalServiceUtil.addUser(...) method, the exportToLDAP(...) method of UserListener class is called or not.

If so then subsequently you can check exportToLDAP(....) method of PortalLDAPExporterUtil.

I hope this might helps you.
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/24 6:50
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Hello,

I'm currently debugging. However I noticed that only the PortalLDAPImporterUtil class is available from the portal Services. However there is no PortalLDAPExporterUtil-class. This is probalby due to the fact, that this class isn't in the portal-service.jar right? If so, is it possible to invoke the Method with a Method-Key or something?

Regards

Marc
Pinkesh Gandhi
RE: Trigger LDAP User Export on User Creation
2012/07/24 10:02
答え

Pinkesh Gandhi

ランク: Regular Member

投稿: 100

参加年月日: 2012/01/26

最近の投稿

Hi Mark,

If you are using Liferay 6.x then the PortalLDAPExporterUtil.java must be available in portal-impl.jar.
And that will be called from UserListener.java so irrespective of context from where you are using UserLocalServiceUtil.addUser(...) the PortalLDAPExporterUtil.exportToLDAP(....) method will be executed.

But first you need to verify by debugging that on calling UserLocalServiceUtil.addUser(...) the method exportToLDAP(...) of UserListener is called or not.

So can you please verify it.
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/25 0:51
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Hello and thanks again. For some reason it's exporting on creation now. My Problem is however, that the password field isn't exported to LDAP. Theres a new Entry in LDAP but with a blank pw field. When Liferay and LDAP synchronize after the default 10 min intervall, the pw in liferays db gets overwritten by the blank pw of LDAP and I can't login anymore...

Regards

Marc
Jignesh Vachhani
RE: Trigger LDAP User Export on User Creation
2012/07/25 1:13
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 792

参加年月日: 2008/03/10

最近の投稿

you must have set userPassword paramater available in your LDAP schema which would be imported in LDAP.
So During LDAP import , ideally it will give exception in server console i think.
Please check your server console , there would be some error when its getting import or export.
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/25 1:25
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

You guys are really fast emoticon. I managed to narrow it down a bit. While creating users with the "addUser()"-method, I don't assign a password at first, so no Problem here. I implemented something like an "activate" button that actually activates the user in Liferay(sets the active status) and updates the pw of the User. And here my Implementation is probably wrong. I update the Password using the UserLocalServiceUtil.updatePasswordManually(...) Method which probably doesn't call the export function.

Regards

Marc
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/25 1:58
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Hmm when I assign a Password using the edit function of a user in the control Panel, the attribute is set on the LDAP Server. Does anyone know, how the Password is updated there, so I could implement it the same way?

Regards

Marc
Jignesh Vachhani
RE: Trigger LDAP User Export on User Creation
2012/07/25 2:17
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 792

参加年月日: 2008/03/10

最近の投稿

You can check implementation in UserLocalserviceImpl class where updatePassword method is exist which could have you this implementation
Pinkesh Gandhi
RE: Trigger LDAP User Export on User Creation
2012/07/25 2:24
答え

Pinkesh Gandhi

ランク: Regular Member

投稿: 100

参加年月日: 2012/01/26

最近の投稿

Again, you can check UserListener.exportToLDAP(...) method.

As when you are assigning password using edit function of a user in control panel, the UserLocalServiceImpl.updateUser(...) method will be called and hence UserListener.onAfterUpdate(...) method will be executed in a separate thread.
Marc Grünewald
RE: Trigger LDAP User Export on User Creation
2012/07/25 4:24
答え

Marc Grünewald

ランク: Junior Member

投稿: 45

参加年月日: 2012/03/20

最近の投稿

Thank you both it seems to work now. I really appreciate your help. Have a nice day!

Regards

Marc
Jignesh Vachhani
RE: Trigger LDAP User Export on User Creation
2012/07/25 4:35
答え

Jignesh Vachhani

ランク: Liferay Master

投稿: 792

参加年月日: 2008/03/10

最近の投稿

Marc,
Glad to hear this news .emoticon
Shiva Krish
RE: Trigger LDAP User Export on User Creation
2016/07/11 22:37
答え

Shiva Krish

ランク: New Member

投稿: 1

参加年月日: 2016/07/11

最近の投稿

Hi
I am using Liferay 6.2 and facing issue in creating user after checking export enabled.Can somebody help on this.


Thanks
Shiva