User Created in LDAP is in disabled status after created by IUserAccount
I have created custom Self Registration page in SAP EP. Here we cant use standard registration page due to its visual limitations.
So I have created new Self Registration page and I am using IUserMaint and IUserAccount classes to create users when user press submit button.
We are using Windows Active Directory LDAP-External for user storage.
User is getting created in portal as well as in LDAP. But when checked in LDAP, I found that user is in disabled status and because of that I am not able to login using the same.
However if I create user by standard registration page, it gets created properly.
Procedure I am following to create user is like this,
1. Create User using IUserMaint, set its rest of the attributes, save and commit.
2. Create User Account using IUserAccount with passing unique Id of IUserMaint, set rest of the attributes, save and commit.
As per blogs and posts present in scn I did this but now I find that, after this User is in disabled status at LDAP level.
When I checked LDAP events for standard and my custom registration page, there is one event missing for custom - 4722(For Enabling the user in LDAP).
I have tried to use setLocked() method of IUserAccount so that this event can be triggered. But whatever I try neither this event is getting triggered or user is not getting set to Enabled in LDAP.
Can anyone suggest where I am going wrong? Or is any step missing?