mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
use Login controller
This commit is contained in:
parent
2556bf5b3f
commit
4e528975b8
|
@ -153,6 +153,25 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
|||
if($this->logger)
|
||||
$this->logger->log('check_auth: type='.$type.', user='.$user.'', PEAR_LOG_INFO);
|
||||
|
||||
$controller = Controller::factory('Login', array('dms'=>$this->dms));
|
||||
$controller->setParam('login', $user);
|
||||
$controller->setParam('pwd', $pass);
|
||||
$controller->setParam('source', 'webdav');
|
||||
if(!$controller()) {
|
||||
if($this->logger) {
|
||||
$this->logger->log($controller->getErrorMsg(), PEAR_LOG_NOTICE);
|
||||
$this->logger->log('check_auth: error authenicating user '.$user, PEAR_LOG_NOTICE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->logger)
|
||||
$this->logger->log('check_auth: type='.$type.', user='.$user.' authenticated', PEAR_LOG_INFO);
|
||||
|
||||
$this->user = $controller->getUser();
|
||||
|
||||
return true;
|
||||
|
||||
$userobj = false;
|
||||
|
||||
/* Authenticate against LDAP server {{{ */
|
||||
|
|
Loading…
Reference in New Issue
Block a user