Wednesday 26 January 2005 5:00:50 am
Hi, We've looked at this issue. The conclusion is: it is a bug. :-) It has been reported, the link to the bugreport is: http://ez.no/community/bugs/loginhandler_issues_webdav_example If you really need to make this work then I suggest that you study how the kernel/user/login.php file takes care of logging in users. It seems that there is some code there which goes through the various login handlers (standard, LDAP, etc.) - which should have been moved out to some kind of a wrapper. What you need to do is to replicate this code in the webdav.php file which is in the root of your eZ publish directory. In particular, I think you'll need to add something that looks like this:
...
$ini =& eZINI::instance();
if ( $ini->hasVariable( 'UserSettings', 'LoginHandler' ) )
{
$loginHandlers = $ini->variable( 'UserSettings', 'LoginHandler' );
}
else
{
$loginHandlers = array( 'standard' );
}
foreach ( array_keys ( $loginHandlers ) as $key )
{
$loginHandler = $loginHandlers[$key];
$userClass =& eZUserLoginHandler::instance( $loginHandler );
$user = $userClass->loginUser( $userLogin, $userPassword );
if ( get_class( $user ) == 'ezuser' )
break;
}
if ( get_class( $user ) != 'ezuser' )
$loginWarning = true;
...
Notice that the code above attempts to log in users by the way of the $userClass (which is connected to the current login handler in the loop) and that the webdav code only logs in users by the standard login handler. This is what you have to change. If you're not able to do this by yourself: I suggest that you wait until the bug is fixed or call up support & pay for an immediate fix. Allman
|