Forums / Install & configuration / LDAP - Prevent user creation
Fernando Palma
Tuesday 11 March 2008 3:38:26 am
Hi there.
I'm setting up a web site with LDAP autentication, that works great for me.
My problem is that I don't won't users to be created when they do the autentication, I only wont them that the username/password be validated by the LDAP server.
I have allready created a script that imports all users I wont to EZ in the LDAP group.
Is there any config setting to disable LDAP user creation or do I have do "go down to the code" and make the changes I wont?
best regards.
../fpalma
André R.
Tuesday 11 March 2008 6:09:32 am
Seems like you need to fork the ldap login handler into you own login handler to be able to do that. Since the ldap login handler authorizes the user against the eZ Publish user after you login (on each request after user is logged in).
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Tuesday 11 March 2008 8:22:47 am
Thanks André.
I have solved the problem by hacking the ezldapuser.
I was "on the search" for a cleaner solution.
Any way, can any one explain to me how to do a clean "fork" for this, like creating my own auth method like an extension and activate it like the ldap one?
Best regards.
Tuesday 11 March 2008 9:39:09 am
Sure, it is actually very simple.
Structure:
extension - <extension_name> -- login_handler --- ez<login_handler_name>user.php -- settings --- site.ini
Site.ini:
[UserSettings] ExtensionDirectory[]=<extension_name> #used login handlers, comment out standard if you don't want it as fall back LoginHandler[] LoginHandler[]=<login_handler_name> LoginHandler[]=standard
Then you activate the extension, in admin or in settings/override/site.ini*(Might want to place the login handler specific ldap.ini settings inside the extension settings folder also!)
Tuesday 11 March 2008 10:48:06 am
Thanks,
I will try that, then I will give you the feed-back.