Saturday 05 November 2011 1:09:38 am
I've been creating modules views to handle special users login but there is a better way to do that, you can just create a custom login handler.
So you need to create an extension with at least two folders, settings and login_handler, this way:
Inside settings folder create the site.ini.append.php file:
<?php /* [UserSettings] ExtensionDirectory[]=myext LoginHandler[]=MyLogin */ ?>
Inside login_handler folder create the file myloginuser.php (needs to end with user.php), with the content (just a sample):
<?php class eZMyLoginUser extends eZUser { function eZMyLoginUser() { } static function loginUser( $login, $password, $authenticationMatch = false ) { /* Code goes here */ } }
That's it! Now ez will use your class before default login handler. See also: