Custom login handler must create user in ez database?

Author Message

Luis Cruz

Tuesday 04 October 2005 7:33:14 am

Greetings; I have been reading up on how to create a custom login handler. Briefly, here is my situation:

A. I have a pre-existing database of user information.
B. Each user has a certain access level associated with them.
C. Depending on their access level, they can or cannot see certain material.
D. I need to have eZ publish authenticate against this database and restrict content based on their access level.

I have read the standard link http://ez.no/products/ez_publish_cms/documentation/configuration/configuration/login_handler/how_to_make_your_own_handler and read the source code for the LDAP and text file login handlers. From this, I have come to this conclusion and need to know if it is accurate.

Every user that logs into the eZ publish system through a customer login handler must have a corresponding content object in the eZ publish database. If you authenticate through your external database, you must create a user content object in eZ publish if it does not already exist.

Is this true, or is there a way to "fake it". In other words, can I write a custom login handler that never creates rows in the eZ publish database but still keeps a user logged into the eZ publish system? Or, should/can I create one generic user for each possible access level and have the login handler just use that user content object for every person that logs in?

Any help is appreciated.

Cheers.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.