mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 06:08:21 +01:00
Replace Zend LDAP
This commit is contained in:
parent
aa8bebea33
commit
a9a5e8f9ba
@ -13,7 +13,7 @@
|
|||||||
},
|
},
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.0.0",
|
"php": ">=7.1",
|
||||||
"ext-exif": "*",
|
"ext-exif": "*",
|
||||||
"ext-zip": "*",
|
"ext-zip": "*",
|
||||||
"cebe/markdown": "1.0.2",
|
"cebe/markdown": "1.0.2",
|
||||||
@ -22,6 +22,8 @@
|
|||||||
"firebase/php-jwt": "^5.0",
|
"firebase/php-jwt": "^5.0",
|
||||||
"jbroadway/urlify": "^1.0",
|
"jbroadway/urlify": "^1.0",
|
||||||
"kartik-v/yii2-widgets": "*",
|
"kartik-v/yii2-widgets": "*",
|
||||||
|
"laminas/laminas-escaper": "^2.6",
|
||||||
|
"laminas/laminas-ldap": "^2.10",
|
||||||
"mistic100/randomcolor": "^1.0",
|
"mistic100/randomcolor": "^1.0",
|
||||||
"npm-asset/animate.css": "*",
|
"npm-asset/animate.css": "*",
|
||||||
"npm-asset/at.js": "^1.5.1",
|
"npm-asset/at.js": "^1.5.1",
|
||||||
@ -60,9 +62,9 @@
|
|||||||
"yiisoft/yii2-jui": "~2.0.0",
|
"yiisoft/yii2-jui": "~2.0.0",
|
||||||
"yiisoft/yii2-queue": "~2.3.0",
|
"yiisoft/yii2-queue": "~2.3.0",
|
||||||
"yiisoft/yii2-redis": "~2.0.0",
|
"yiisoft/yii2-redis": "~2.0.0",
|
||||||
"yiisoft/yii2-swiftmailer": "~2.0.0",
|
"yiisoft/yii2-swiftmailer": "~2.0.0"
|
||||||
"zendframework/zend-http": "*",
|
},
|
||||||
"zendframework/zend-ldap": "^2.5"
|
"replace": {
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"codeception/codeception": "^4.0",
|
"codeception/codeception": "^4.0",
|
||||||
@ -86,9 +88,6 @@
|
|||||||
],
|
],
|
||||||
"config": {
|
"config": {
|
||||||
"process-timeout": 1800,
|
"process-timeout": 1800,
|
||||||
"platform": {
|
|
||||||
"php": "7.0"
|
|
||||||
},
|
|
||||||
"vendor-dir": "protected/vendor",
|
"vendor-dir": "protected/vendor",
|
||||||
"sort-packages": true,
|
"sort-packages": true,
|
||||||
"fxp-asset": {
|
"fxp-asset": {
|
||||||
|
3054
composer.lock
generated
3054
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -23,10 +23,10 @@ use Yii;
|
|||||||
use yii\db\Expression;
|
use yii\db\Expression;
|
||||||
use yii\helpers\ArrayHelper;
|
use yii\helpers\ArrayHelper;
|
||||||
use yii\helpers\VarDumper;
|
use yii\helpers\VarDumper;
|
||||||
use Zend\Ldap\Exception\LdapException;
|
use Laminas\Ldap\Exception\LdapException;
|
||||||
use Zend\Ldap\Ldap;
|
use Laminas\Ldap\Ldap;
|
||||||
use humhub\modules\ldap\components\ZendLdap;
|
use humhub\modules\ldap\components\ZendLdap;
|
||||||
use Zend\Ldap\Node;
|
use Laminas\Ldap\Node;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LDAP Authentication
|
* LDAP Authentication
|
||||||
@ -438,7 +438,7 @@ class LdapAuth extends BaseFormAuth implements AutoSyncUsers, SyncAttributes, Ap
|
|||||||
/**
|
/**
|
||||||
* Sets an Zend LDAP Instance
|
* Sets an Zend LDAP Instance
|
||||||
*
|
*
|
||||||
* @param \Zend\Ldap\Ldap $ldap
|
* @param \Laminas\Ldap\Ldap $ldap
|
||||||
*/
|
*/
|
||||||
public function setLdap(Ldap $ldap)
|
public function setLdap(Ldap $ldap)
|
||||||
{
|
{
|
||||||
@ -519,7 +519,7 @@ class LdapAuth extends BaseFormAuth implements AutoSyncUsers, SyncAttributes, Ap
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Zend\Ldap\Exception\LdapException $ex) {
|
} catch (\Laminas\Ldap\Exception\LdapException $ex) {
|
||||||
Yii::error('Could not connect to LDAP instance: ' . $ex->getMessage(), 'ldap');
|
Yii::error('Could not connect to LDAP instance: ' . $ex->getMessage(), 'ldap');
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
Yii::error('An error occurred while user sync: ' . $ex->getMessage(), 'ldap');
|
Yii::error('An error occurred while user sync: ' . $ex->getMessage(), 'ldap');
|
||||||
|
@ -17,7 +17,7 @@ use yii\console\ExitCode;
|
|||||||
use yii\console\widgets\Table;
|
use yii\console\widgets\Table;
|
||||||
use yii\db\Expression;
|
use yii\db\Expression;
|
||||||
use yii\helpers\Console;
|
use yii\helpers\Console;
|
||||||
use Zend\Ldap\Ldap;
|
use Laminas\Ldap\Ldap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Console tools for manage Ldap
|
* Console tools for manage Ldap
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
namespace humhub\modules\ldap\components;
|
namespace humhub\modules\ldap\components;
|
||||||
|
|
||||||
|
|
||||||
use Zend\Ldap\Ldap;
|
use Laminas\Ldap\Ldap;
|
||||||
use Zend\Ldap\Filter;
|
use Laminas\Ldap\Filter;
|
||||||
use Zend\Ldap\Dn;
|
use Laminas\Ldap\Dn;
|
||||||
use Zend\Ldap\Exception;
|
use Laminas\Ldap\Exception;
|
||||||
use Zend\Ldap\Exception\LdapException;
|
use Laminas\Ldap\Exception\LdapException;
|
||||||
use Traversable;
|
use Traversable;
|
||||||
use Zend\Ldap\ErrorHandler;
|
use Laminas\Ldap\ErrorHandler;
|
||||||
|
|
||||||
|
|
||||||
class ZendLdap extends Ldap
|
class ZendLdap extends Ldap
|
||||||
|
@ -14,8 +14,8 @@ use humhub\modules\admin\components\Controller;
|
|||||||
use humhub\modules\ldap\models\LdapSettings;
|
use humhub\modules\ldap\models\LdapSettings;
|
||||||
use humhub\modules\user\authclient\LdapAuth;
|
use humhub\modules\user\authclient\LdapAuth;
|
||||||
use Yii;
|
use Yii;
|
||||||
use Zend\Ldap\Exception\LdapException;
|
use Laminas\Ldap\Exception\LdapException;
|
||||||
use Zend\Ldap\Ldap;
|
use Laminas\Ldap\Ldap;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,7 @@ class LdapHelper
|
|||||||
*/
|
*/
|
||||||
public static function isLdapAvailable()
|
public static function isLdapAvailable()
|
||||||
{
|
{
|
||||||
if (!class_exists('Zend\Ldap\Ldap')) {
|
if (!class_exists('Laminas\Ldap\Ldap')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user