diff --git a/data/Dockerfiles/phpfpm/Dockerfile b/data/Dockerfiles/phpfpm/Dockerfile
index af23bc2ec..b1e5e01a4 100644
--- a/data/Dockerfiles/phpfpm/Dockerfile
+++ b/data/Dockerfiles/phpfpm/Dockerfile
@@ -1,4 +1,4 @@
-FROM php:8.2-fpm-alpine3.24
+FROM php:8.5-fpm-alpine3.24
LABEL maintainer = "The Infrastructure Company GmbH "
@@ -16,10 +16,7 @@ ARG REDIS_PECL_VERSION=6.3.0
ARG COMPOSER_VERSION=2.10.2
RUN apk add -U --no-cache autoconf \
- aspell-dev \
- aspell-libs \
bash \
- c-client \
cyrus-sasl-dev \
freetype \
freetype-dev \
@@ -33,7 +30,6 @@ RUN apk add -U --no-cache autoconf \
icu-libs \
imagemagick \
imagemagick-dev \
- imap-dev \
jq \
libavif \
libavif-dev \
@@ -81,22 +77,18 @@ RUN apk add -U --no-cache autoconf \
--with-webp \
--with-xpm \
--with-avif \
- && docker-php-ext-install -j 4 exif gd gettext intl ldap opcache pcntl pdo pdo_mysql pspell soap sockets zip bcmath gmp \
- && docker-php-ext-configure imap --with-imap --with-imap-ssl \
- && docker-php-ext-install -j 4 imap \
+ && docker-php-ext-install -j 4 exif gd gettext intl ldap pcntl pdo pdo_mysql soap sockets zip bcmath gmp \
&& curl --silent --show-error https://getcomposer.org/installer | php -- --version=${COMPOSER_VERSION} \
&& mv composer.phar /usr/local/bin/composer \
&& chmod +x /usr/local/bin/composer \
&& docker-php-source delete \
&& apk del --purge autoconf \
- aspell-dev \
cyrus-sasl-dev \
freetype-dev \
g++ \
gettext-dev \
icu-dev \
imagemagick-dev \
- imap-dev \
libavif-dev \
libjpeg-turbo-dev \
libmemcached-dev \
diff --git a/data/conf/phpfpm/php-conf.d/other.ini b/data/conf/phpfpm/php-conf.d/other.ini
index e60e9f815..442ac5867 100644
--- a/data/conf/phpfpm/php-conf.d/other.ini
+++ b/data/conf/phpfpm/php-conf.d/other.ini
@@ -3,3 +3,6 @@ max_input_time = 3600
memory_limit = 512M
; not used by mailcow, disabled as hardening (PHP security release 2026-10-21)
session.upload_progress.enabled = Off
+display_errors = Off
+log_errors = On
+zend.assertions = -1
diff --git a/data/conf/rspamd/meta_exporter/pushover.php b/data/conf/rspamd/meta_exporter/pushover.php
index e937c6956..5c519fd16 100644
--- a/data/conf/rspamd/meta_exporter/pushover.php
+++ b/data/conf/rspamd/meta_exporter/pushover.php
@@ -266,7 +266,6 @@ foreach ($rcpt_final_mailboxes as $rcpt_final) {
));
$result = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
error_log("NOTIFY: result: " . $httpcode . PHP_EOL);
}
}
diff --git a/data/web/inc/ajax/dns_diagnostics.php b/data/web/inc/ajax/dns_diagnostics.php
index 5efbaa472..a2c69aef1 100644
--- a/data/web/inc/ajax/dns_diagnostics.php
+++ b/data/web/inc/ajax/dns_diagnostics.php
@@ -30,7 +30,6 @@ if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "adm
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
$ip = curl_exec($ch);
- curl_close($ch);
$ch = curl_init('http://ip6.mailcow.email');
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
@@ -39,7 +38,6 @@ if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "adm
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
$ip6 = curl_exec($ch);
- curl_close($ch);
$ptr = implode('.', array_reverse(explode('.', $ip))) . '.in-addr.arpa';
if (!empty($ip6)) {
diff --git a/data/web/inc/ajax/update_check.php b/data/web/inc/ajax/update_check.php
index 6bf016001..d28e3440b 100644
--- a/data/web/inc/ajax/update_check.php
+++ b/data/web/inc/ajax/update_check.php
@@ -35,7 +35,6 @@ function github_get($url) {
));
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
if ($body === false || $code !== 200) return false;
$json = json_decode($body, true);
return is_array($json) ? $json : false;
diff --git a/data/web/inc/functions.auth.inc.php b/data/web/inc/functions.auth.inc.php
index 832b88359..07fc285ca 100644
--- a/data/web/inc/functions.auth.inc.php
+++ b/data/web/inc/functions.auth.inc.php
@@ -566,7 +566,6 @@ function keycloak_mbox_login_rest($user, $pass, $extra = null){
}
$users = json_decode(curl_exec($curl), true);
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
- curl_close($curl);
// the password is checked below, a failed request is never a wrong password
if ($code != 200) {
throw new \Mailcow\Auth\IdpUnavailable('Keycloak returned HTTP ' . $code);
diff --git a/data/web/inc/functions.dkim.inc.php b/data/web/inc/functions.dkim.inc.php
index e7e411730..b39317a95 100644
--- a/data/web/inc/functions.dkim.inc.php
+++ b/data/web/inc/functions.dkim.inc.php
@@ -115,7 +115,7 @@ function dkim($_action, $_data = null, $privkey = false) {
'log' => array(__FUNCTION__, $_action, $_data),
'msg' => array('dkim_domain_or_sel_invalid', $from_domain)
);
- continue;
+ return false;
}
$to_domains = (array)$_data['to_domain'];
$to_domains = array_filter($to_domains);
diff --git a/data/web/inc/functions.docker.inc.php b/data/web/inc/functions.docker.inc.php
index daed17c63..b13a2a225 100644
--- a/data/web/inc/functions.docker.inc.php
+++ b/data/web/inc/functions.docker.inc.php
@@ -16,11 +16,9 @@ function docker($action, $service_name = null, $attr1 = null, $attr2 = null, $ex
$response = curl_exec($curl);
if ($response === false) {
$err = curl_error($curl);
- curl_close($curl);
return $err;
}
else {
- curl_close($curl);
$containers = json_decode($response, true);
if (!empty($containers)) {
foreach ($containers as $container) {
@@ -42,11 +40,9 @@ function docker($action, $service_name = null, $attr1 = null, $attr2 = null, $ex
$response = curl_exec($curl);
if ($response === false) {
$err = curl_error($curl);
- curl_close($curl);
return $err;
}
else {
- curl_close($curl);
$containers = json_decode($response, true);
if (!empty($containers)) {
foreach ($containers as $container) {
@@ -83,11 +79,9 @@ function docker($action, $service_name = null, $attr1 = null, $attr2 = null, $ex
$response = curl_exec($curl);
if ($response === false) {
$err = curl_error($curl);
- curl_close($curl);
return $err;
}
else {
- curl_close($curl);
$decoded_response = json_decode($response, true);
if (!empty($decoded_response)) {
if (empty($service_name)) {
@@ -136,11 +130,9 @@ function docker($action, $service_name = null, $attr1 = null, $attr2 = null, $ex
$response = curl_exec($curl);
if ($response === false) {
$err = curl_error($curl);
- curl_close($curl);
return $err;
}
else {
- curl_close($curl);
if (empty($response)) {
return true;
}
@@ -164,11 +156,9 @@ function docker($action, $service_name = null, $attr1 = null, $attr2 = null, $ex
$response = curl_exec($curl);
if ($response === false) {
$err = curl_error($curl);
- curl_close($curl);
return $err;
}
else {
- curl_close($curl);
$stats = json_decode($response, true);
if (!empty($stats)) return $stats;
}
@@ -182,11 +172,9 @@ function docker($action, $service_name = null, $attr1 = null, $attr2 = null, $ex
$response = curl_exec($curl);
if ($response === false) {
$err = curl_error($curl);
- curl_close($curl);
return $err;
}
else {
- curl_close($curl);
$stats = json_decode($response, true);
if (!empty($stats)) return $stats;
}
diff --git a/data/web/inc/functions.domain_admin.inc.php b/data/web/inc/functions.domain_admin.inc.php
index e2261ea70..ee86a578f 100644
--- a/data/web/inc/functions.domain_admin.inc.php
+++ b/data/web/inc/functions.domain_admin.inc.php
@@ -66,7 +66,7 @@ function domain_admin($_action, $_data = null) {
}
}
if (password_check($password, $password2) !== true) {
- continue;
+ return false;
}
$password_hashed = hash_password($password);
$valid_domains = 0;
diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php
index b57222e3a..77b6037c9 100644
--- a/data/web/inc/functions.inc.php
+++ b/data/web/inc/functions.inc.php
@@ -371,12 +371,10 @@ function last_login($action, $username, $sasl_limit_days = 7, $ui_offset = 1) {
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('redis_error', $e)
);
- curl_close($curl);
return false;
}
}
}
- curl_close($curl);
}
}
}
@@ -2128,7 +2126,6 @@ function license($action, $data = null) {
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($curl);
- curl_close($curl);
$json_return = json_decode($response, true);
if ($response && $json_return) {
if ($json_return['response'] === "ok") {
@@ -3849,10 +3846,8 @@ function get_logs($application, $lines = false) {
$history = curl_exec($curl);
if (!curl_errno($curl)) {
$data_array = json_decode($history, true);
- curl_close($curl);
return $data_array['rows'];
}
- curl_close($curl);
return false;
}
if ($application == "rspamd-stats") {
@@ -3863,10 +3858,8 @@ function get_logs($application, $lines = false) {
$stats = curl_exec($curl);
if (!curl_errno($curl)) {
$data_array = json_decode($stats, true);
- curl_close($curl);
return $data_array;
}
- curl_close($curl);
return false;
}
return false;
@@ -3875,7 +3868,6 @@ function getGUID() {
if (function_exists('com_create_guid')) {
return com_create_guid();
}
- mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
$charid = strtoupper(md5(uniqid(rand(), true)));
$hyphen = chr(45);// "-"
return substr($charid, 0, 8).$hyphen
diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php
index 9187e0b30..360aa4522 100644
--- a/data/web/inc/functions.mailbox.inc.php
+++ b/data/web/inc/functions.mailbox.inc.php
@@ -4306,7 +4306,6 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
$default_actions = curl_exec($curl);
if (!curl_errno($curl)) {
$data_array = json_decode($default_actions, true);
- curl_close($curl);
foreach ($data_array as $data) {
if ($data['action'] == 'reject') {
$reject = $data['value'];
@@ -4339,7 +4338,6 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
'msg' => 'Could not determine servers default spam score, assuming default'
);
}
- curl_close($curl);
$policydata = array();
if (isset($_data) && filter_var($_data, FILTER_VALIDATE_EMAIL)) {
if (!hasMailboxObjectAccess($_SESSION['mailcow_cc_username'], $_SESSION['mailcow_cc_role'], $_data)) {
diff --git a/data/web/inc/functions.pushover.inc.php b/data/web/inc/functions.pushover.inc.php
index 5393c0d5e..787ee1cf4 100644
--- a/data/web/inc/functions.pushover.inc.php
+++ b/data/web/inc/functions.pushover.inc.php
@@ -193,7 +193,6 @@ function pushover($_action, $_data = null) {
));
$result = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
if ($httpcode == 200) {
$_SESSION['return'][] = array(
'type' => 'success',
diff --git a/data/web/inc/functions.quarantine.inc.php b/data/web/inc/functions.quarantine.inc.php
index 55674e528..6d65eb487 100644
--- a/data/web/inc/functions.quarantine.inc.php
+++ b/data/web/inc/functions.quarantine.inc.php
@@ -537,7 +537,6 @@ function quarantine($_action, $_data = null) {
continue;
}
}
- curl_close($curl);
$curl = curl_init();
curl_setopt($curl, CURLOPT_UNIX_SOCKET_PATH, '/var/lib/rspamd/rspamd.sock');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
@@ -549,7 +548,6 @@ function quarantine($_action, $_data = null) {
// It is most likely not a spam hash, so we ignore any error/warning response
// $response = curl_exec($curl);
if (!curl_errno($curl)) {
- curl_close($curl);
$curl = curl_init();
curl_setopt($curl, CURLOPT_UNIX_SOCKET_PATH, '/var/lib/rspamd/rspamd.sock');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
@@ -572,7 +570,6 @@ function quarantine($_action, $_data = null) {
}
}
}
- curl_close($curl);
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
@@ -581,7 +578,6 @@ function quarantine($_action, $_data = null) {
continue;
}
else {
- curl_close($curl);
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
@@ -589,7 +585,6 @@ function quarantine($_action, $_data = null) {
);
continue;
}
- curl_close($curl);
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
@@ -603,10 +598,8 @@ function quarantine($_action, $_data = null) {
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('ham_learn_error', 'Curl: ' . curl_strerror(curl_errno($curl)))
);
- curl_close($curl);
continue;
}
- curl_close($curl);
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
@@ -668,7 +661,6 @@ function quarantine($_action, $_data = null) {
continue;
}
}
- curl_close($curl);
$curl = curl_init();
curl_setopt($curl, CURLOPT_UNIX_SOCKET_PATH, '/var/lib/rspamd/rspamd.sock');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
@@ -680,7 +672,6 @@ function quarantine($_action, $_data = null) {
// It is most likely not a spam hash, so we ignore any error/warning response
// $response = curl_exec($curl);
if (!curl_errno($curl)) {
- curl_close($curl);
$curl = curl_init();
curl_setopt($curl, CURLOPT_UNIX_SOCKET_PATH, '/var/lib/rspamd/rspamd.sock');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
@@ -703,7 +694,6 @@ function quarantine($_action, $_data = null) {
}
}
}
- curl_close($curl);
$_SESSION['return'][] = array(
'type' => 'success',
'log' => array(__FUNCTION__, $_action, $_data_log),
@@ -712,7 +702,6 @@ function quarantine($_action, $_data = null) {
continue;
}
else {
- curl_close($curl);
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
@@ -720,7 +709,6 @@ function quarantine($_action, $_data = null) {
);
continue;
}
- curl_close($curl);
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
@@ -734,10 +722,8 @@ function quarantine($_action, $_data = null) {
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => array('spam_learn_error', 'Curl: ' . curl_strerror(curl_errno($curl)))
);
- curl_close($curl);
continue;
}
- curl_close($curl);
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
diff --git a/data/web/inc/lib/CSSminifierExtended.php b/data/web/inc/lib/CSSminifierExtended.php
index 125381c47..72dc61a97 100644
--- a/data/web/inc/lib/CSSminifierExtended.php
+++ b/data/web/inc/lib/CSSminifierExtended.php
@@ -11,7 +11,6 @@ class CSSminifierExtended extends CSS {
private function accessProtected($obj, $prop) {
$reflection = new ReflectionClass($obj);
$property = $reflection->getProperty($prop);
- $property->setAccessible(true);
return $property->getValue($obj);
}
diff --git a/data/web/inc/lib/JSminifierExtended.php b/data/web/inc/lib/JSminifierExtended.php
index c891cb81a..f59760d59 100644
--- a/data/web/inc/lib/JSminifierExtended.php
+++ b/data/web/inc/lib/JSminifierExtended.php
@@ -11,7 +11,6 @@ class JSminifierExtended extends JS {
private function accessProtected($obj, $prop) {
$reflection = new ReflectionClass($obj);
$property = $reflection->getProperty($prop);
- $property->setAccessible(true);
return $property->getValue($obj);
}
diff --git a/data/web/inc/lib/WebAuthn/WebAuthn.php b/data/web/inc/lib/WebAuthn/WebAuthn.php
index 10596ea5b..a69dce694 100644
--- a/data/web/inc/lib/WebAuthn/WebAuthn.php
+++ b/data/web/inc/lib/WebAuthn/WebAuthn.php
@@ -483,7 +483,6 @@ class WebAuthn {
\curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
\curl_setopt($ch, CURLOPT_USERAGENT, 'github.com/lbuchs/WebAuthn - A simple PHP WebAuthn server library');
$raw = \curl_exec($ch);
- \curl_close($ch);
} else {
$raw = \file_get_contents($url);
}
diff --git a/data/web/inc/lib/Yubico.php b/data/web/inc/lib/Yubico.php
index cde9f4d1d..2942e54a3 100644
--- a/data/web/inc/lib/Yubico.php
+++ b/data/web/inc/lib/Yubico.php
@@ -442,7 +442,6 @@ class Auth_Yubico
/* We have status=OK or status=REPLAYED_OTP, return. */
foreach ($ch as $h) {
curl_multi_remove_handle($mh, $h);
- curl_close($h);
}
curl_multi_close($mh);
if ($replay) return PEAR::raiseError('REPLAYED_OTP');
@@ -476,7 +475,6 @@ class Auth_Yubico
}
/* Done with this handle */
curl_multi_remove_handle($mh, $info['handle']);
- curl_close($info['handle']);
unset ($ch[(int)$info['handle']]);
}
} while ($active);
diff --git a/data/web/inc/lib/composer.json b/data/web/inc/lib/composer.json
index 48c3375ed..3802e93ad 100644
--- a/data/web/inc/lib/composer.json
+++ b/data/web/inc/lib/composer.json
@@ -4,7 +4,6 @@
"phpmailer/phpmailer": "^6.1",
"php-mime-mail-parser/php-mime-mail-parser": "^7",
"soundasleep/html2text": "^0.5.0",
- "ddeboer/imap": "^1.5",
"matthiasmullie/minify": "^1.3",
"bshaffer/oauth2-server-php": "^1.11",
"mustangostang/spyc": "^0.6.3",
diff --git a/data/web/inc/lib/composer.lock b/data/web/inc/lib/composer.lock
index 1e28d8b12..46741c2fc 100644
--- a/data/web/inc/lib/composer.lock
+++ b/data/web/inc/lib/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "c1b9909a3828030c80954fd2c04dfbee",
+ "content-hash": "57253e8e8aa6a06c7fa933d1d1344a8c",
"packages": [
{
"name": "bacon/bacon-qr-code",
@@ -246,82 +246,6 @@
},
"time": "2025-09-16T12:23:56+00:00"
},
- {
- "name": "ddeboer/imap",
- "version": "1.19.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ddeboer/imap.git",
- "reference": "30800b1cfeacc4add5bb418e40a8b6e95a8a04ac"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ddeboer/imap/zipball/30800b1cfeacc4add5bb418e40a8b6e95a8a04ac",
- "reference": "30800b1cfeacc4add5bb418e40a8b6e95a8a04ac",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-iconv": "*",
- "ext-imap": "*",
- "ext-libxml": "*",
- "ext-mbstring": "*",
- "php": "~8.2.0 || ~8.3.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^3.38.2",
- "laminas/laminas-mail": "^2.25.1",
- "phpstan/phpstan": "^1.10.43",
- "phpstan/phpstan-phpunit": "^1.3.15",
- "phpstan/phpstan-strict-rules": "^1.5.2",
- "phpunit/phpunit": "^10.4.2"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Ddeboer\\Imap\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "David de Boer",
- "email": "david@ddeboer.nl"
- },
- {
- "name": "Filippo Tessarotto",
- "email": "zoeslam@gmail.com"
- },
- {
- "name": "Community contributors",
- "homepage": "https://github.com/ddeboer/imap/graphs/contributors"
- }
- ],
- "description": "Object-oriented IMAP for PHP",
- "keywords": [
- "email",
- "imap",
- "mail"
- ],
- "support": {
- "issues": "https://github.com/ddeboer/imap/issues",
- "source": "https://github.com/ddeboer/imap/tree/1.19.0"
- },
- "funding": [
- {
- "url": "https://github.com/Slamdunk",
- "type": "github"
- },
- {
- "url": "https://github.com/ddeboer",
- "type": "github"
- }
- ],
- "time": "2023-11-20T14:41:54+00:00"
- },
{
"name": "directorytree/ldaprecord",
"version": "v3.8.6",
diff --git a/data/web/inc/lib/mailcow/Identity/Http/KeycloakClient.php b/data/web/inc/lib/mailcow/Identity/Http/KeycloakClient.php
index c60b2fb02..7e244da87 100644
--- a/data/web/inc/lib/mailcow/Identity/Http/KeycloakClient.php
+++ b/data/web/inc/lib/mailcow/Identity/Http/KeycloakClient.php
@@ -83,7 +83,6 @@ class KeycloakClient
$response = curl_exec($curl);
$code = (int)curl_getinfo($curl, CURLINFO_HTTP_CODE);
$error = curl_error($curl);
- curl_close($curl);
if ($response === false) {
throw new DirectoryException('Keycloak request failed: ' . $error);
}
diff --git a/data/web/inc/lib/mailcow/Imapsync/Http/OAuthClient.php b/data/web/inc/lib/mailcow/Imapsync/Http/OAuthClient.php
index 9729d6644..1ef3ce6ad 100644
--- a/data/web/inc/lib/mailcow/Imapsync/Http/OAuthClient.php
+++ b/data/web/inc/lib/mailcow/Imapsync/Http/OAuthClient.php
@@ -92,7 +92,6 @@ class OAuthClient
curl_setopt_array($ch, $options);
$body = curl_exec($ch);
$code = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
return [is_string($body) ? $body : false, $code];
}
diff --git a/data/web/inc/lib/sieve/SieveKeywordRegistry.php b/data/web/inc/lib/sieve/SieveKeywordRegistry.php
index b901dbc3a..1f2f57d8a 100644
--- a/data/web/inc/lib/sieve/SieveKeywordRegistry.php
+++ b/data/web/inc/lib/sieve/SieveKeywordRegistry.php
@@ -115,7 +115,7 @@ class SieveKeywordRegistry
'extends' => (string) $e['extends'],
'rules' => $xml
);
- continue;
+ continue 2;
default:
trigger_error('Unsupported extension type \''.
$e->getName() ."' in extension '$extension'");
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/.gitattributes b/data/web/inc/lib/vendor/adldap2/adldap2/.gitattributes
deleted file mode 100644
index 84b904de5..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-examples/ export-ignore
-tests/ export-ignore
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/.github/issue_template.md b/data/web/inc/lib/vendor/adldap2/adldap2/.github/issue_template.md
deleted file mode 100644
index f9aba6bda..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/.github/issue_template.md
+++ /dev/null
@@ -1,10 +0,0 @@
-- Adldap2 Version: #.#
-- LDAP Type:
-- PHP Version: #.#
-
-
-
-### Description:
-
-
-### Steps To Reproduce:
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/.gitignore b/data/web/inc/lib/vendor/adldap2/adldap2/.gitignore
deleted file mode 100644
index 2130d0978..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/.idea
-/vendor
-composer.lock
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/.scrutinizer.yml b/data/web/inc/lib/vendor/adldap2/adldap2/.scrutinizer.yml
deleted file mode 100644
index 9dbf8c110..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/.scrutinizer.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-filter:
- excluded_paths:
- - tests/*
- - src/Schemas/*
-build:
- nodes:
- analysis:
- tests:
- override:
- - command: php-scrutinizer-run
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/.styleci.yml b/data/web/inc/lib/vendor/adldap2/adldap2/.styleci.yml
deleted file mode 100644
index 8be488dfc..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/.styleci.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-preset: recommended
-
-enabled:
- - length_ordered_imports
-
-disabled:
- - alpha_ordered_imports
\ No newline at end of file
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/.travis.yml b/data/web/inc/lib/vendor/adldap2/adldap2/.travis.yml
deleted file mode 100644
index 2723d6878..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/.travis.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-language: php
-
-php:
- - 7.1
- - 7.2
- - 7.3
- - 7.4
-
-before_script:
- - travis_retry composer self-update
- - travis_retry composer install --prefer-source --no-interaction
-
-script: ./vendor/bin/phpunit
-
-branches:
- only:
- - master
- - v9.0
- - v8.0
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/composer.json b/data/web/inc/lib/vendor/adldap2/adldap2/composer.json
deleted file mode 100644
index 26c153471..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/composer.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "adldap2/adldap2",
- "type": "library",
- "description": "A PHP LDAP Package for humans.",
- "keywords": [
- "active directory",
- "directory",
- "ad",
- "ldap",
- "windows",
- "adldap",
- "adldap2"
- ],
- "license": "MIT",
- "support": {
- "docs": "https://github.com/Adldap2/Adldap2/blob/master/readme.md",
- "issues": "https://github.com/Adldap2/Adldap2/issues",
- "source": "https://github.com/Adldap2/Adldap2",
- "email": "steven_bauman@outlook.com"
- },
- "authors": [
- {
- "name": "Steve Bauman",
- "email": "steven_bauman@outlook.com",
- "role": "Developer"
- }
- ],
- "require": {
- "php": ">=7.0",
- "ext-ldap": "*",
- "ext-json": "*",
- "psr/log": "~1.0",
- "psr/simple-cache": "~1.0",
- "tightenco/collect": "~5.0|~6.0|~7.0|~8.0",
- "illuminate/contracts": "~5.0|~6.0|~7.0|~8.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~6.0|~7.0|~8.0",
- "mockery/mockery": "~1.0"
- },
- "suggest": {
- "ext-fileinfo": "fileinfo is required when retrieving user encoded thumbnails"
- },
- "archive": {
- "exclude": ["/examples", "/tests"]
- },
- "autoload": {
- "psr-4": {
- "Adldap\\": "src/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "Adldap\\Tests\\": "tests/"
- }
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/.nojekyll b/data/web/inc/lib/vendor/adldap2/adldap2/docs/.nojekyll
deleted file mode 100644
index e69de29bb..000000000
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/_coverpage.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/_coverpage.md
deleted file mode 100644
index fc8ec0b9d..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/_coverpage.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-# Adldap2
-
-
-
-
-
-
-
-
-
-> Working with LDAP doesn't need to be hard.
-
-
-
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/_sidebar.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/_sidebar.md
deleted file mode 100644
index 028465310..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/_sidebar.md
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-* Getting Started
-
- * [Introduction](/)
- * [Installation](installation.md)
- * [Setup](setup.md)
-
-* Usage
-
- * [Searching](searching.md)
- * [Creating & Updating](models/model.md)
- * [Events](events.md)
- * [Logging](logging.md)
- * [Working With Distiguished Names](distinguished-names.md)
- * [Troubleshooting](troubleshooting.md)
-
-* Models
- * [Model (Base)](models/model.md)
- * [Computer](models/computer.md)
- * [Contact](models/contact.md)
- * [Container](models/container.md)
- * [Group](models/group.md)
- * [Organizational Unit](models/ou.md)
- * [Printer](models/printer.md)
- * [RootDse](models/root-dse.md)
- * [User](models/user.md)
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/distinguished-names.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/distinguished-names.md
deleted file mode 100644
index 490b99b01..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/distinguished-names.md
+++ /dev/null
@@ -1,167 +0,0 @@
-## Working With Distinguished Names
-
-Working with DN strings are a pain, but they're about to get easier. Adldap includes a DN builder for easily modifying and
-creating DN strings.
-
-> **Note**: All values inserted into DN methods are escaped. You do not need to escape **any** values before hand.
-
-#### Creating a New DN
-
-To create a new DN, construct a new `Adldap\Models\Attributes\DistinguishedName` instance:
-
-```php
-$dn = new Adldap\Models\Attributes\DistinguishedName();
-```
-
-You can also pass in a current DN string and start modifying it:
-
-```php
-$currentDn = 'cn=John Doe,ou=Accounting,dc=corp,dc=acme,dc=org';
-
-$dn = new Adldap\Models\Attributes\DistinguishedName($currentDn);
-```
-
-#### Adding / Removing a Domain Component
-
-```php
-// Add Domain Component
-$dn->addDc('corp');
-
-// Remove Domain Component
-$dn->removeDc('corp');
-```
-
-#### Adding / Removing an Organizational Unit
-
-```php
-// Add Organizational Unit
-$dn->addOu('Accounting');
-
-// Remove Organizational Unit
-$dn->removeOu('Accounting');
-```
-
-#### Adding / Removing Common Names
-
-```php
-// Add Common Name
-$dn->addCn('John Doe');
-
-// Remove Common Name
-$dn->removeCn('John Doe');
-```
-
-#### Setting a base
-
-If you'd like to set the base DN, such as a domain component RDN, use the `setBase()` method:
-
-```php
-$base = 'dc=corp,dc=acme,dc=org';
-
-$dn->setBase($base);
-```
-
-#### Creating a DN From A Model
-
-When you're creating a new LDAP record, you'll need to create a distinguished name as well. Let's go through an example of
-creating a new user.
-
-```php
-$user = $provider->make()->user();
-
-$user->setCommonName('John Doe');
-$user->setFirstName('John');
-$user->setLastName('Doe');
-```
-
-So we've set the basic information on the user, but we run into trouble when we want to put the user into a certain container
-(such as 'Accounting') which is done through the DN. Let's go through this example:
-
-```php
-$dn = $user->getDnBuilder();
-
-$dn->addCn($user->getCommonName());
-$dn->addOu('Accounting');
-$dn->addDc('corp');
-$dn->addDc('acme');
-$dn->addDc('org');
-
-// Returns 'cn=John Doe,ou=Accounting,dc=corp,dc=acme,dc=org'
-echo $dn->get();
-
-// The DistinguishedName object also contains the __toString() magic method
-// so you can also just echo the object itself
-echo $dn;
-```
-
-Now we've built a DN, and all we have to do is set it on the new user:
-
-```php
-$user->setDn($dn);
-
-$user->save();
-```
-
-#### Modifying a DN From A Model
-
-When you've received a model from a search result, you can build and modify the models DN like so:
-
-```php
-$user = $ad->users()->find('jdoe');
-
-$dn = $user->getDnBuilder();
-
-$dn->addOu('Users');
-
-$user->setDn($dn)->save();
-```
-
-#### Retrieving the RDN components
-
-To retrieve all of the RDN components of a Distinguished Name, call `getComponents()`:
-
-```php
-$dn = new Adldap\Models\Attributes\DistinguishedName(
- 'cn=John Doe,ou=Accounting,dc=corp,dc=acme,dc=org'
-);
-
-$components = $dn->getComponents();
-
-var_dump($components);
-
-// Output:
-// array:5 [▼
-// "cn" => array:1 [▼
-// 0 => "John Doe"
-// ]
-// "uid" => []
-// "ou" => array:1 [▼
-// 0 => "Accounting"
-// ]
-// "dc" => array:3 [▼
-// 0 => "corp"
-// 1 => "acme"
-// 2 => "org"
-// ]
-// "o" => []
-// ]
-```
-
-You can also specify a component you would like returned by supplying it as an argument:
-
-```php
-$dn = new Adldap\Models\Attributes\DistinguishedName(
- 'cn=John Doe,ou=Accounting,dc=corp,dc=acme,dc=org'
-);
-
-$dcs = $dn->getComponents('dc');
-
-var_dump($dcs);
-
-// Output:
-// array:3 [▼
-// 0 => "corp"
-// 1 => "acme"
-// 2 => "org"
-// ]
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/events.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/events.md
deleted file mode 100644
index 81756958b..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/events.md
+++ /dev/null
@@ -1,175 +0,0 @@
-# Events
-
-Adldap2 events provide a method of listening for certain LDAP actions
-that are called and execute tasks for that specific event.
-
-> **Note**: The Adldap2 event dispatcher was actually derived from the
-> [Laravel Framework](https://github.com/laravel/framework) with
-> Broadcasting & Queuing omitted to remove extra dependencies
-> that would be required with implementing those features.
->
-> If you've utilized Laravel's events before, this will feel very familiar.
-
-## Registering Listeners
-
-> **Note**: Before we get to registering listeners, it's crucial to know that events throughout
-> Adldap2 are fired irrespective of the current connection or provider in use.
->
-> This means that when using multiple LDAP connections, the same events will be fired.
->
-> This allows you to set listeners on events that occur for all LDAP connections you utilize.
->
-> If you are required to determine which events are fired from alternate connections, see [below](#determining-the-connection).
-
-To register a listener on an event, retrieve the event dispatcher and call the `listen()` method:
-
-```php
-use Adldap\Auth\Events\Binding;
-
-$dispatcher = \Adldap\Adldap::getEventDispatcher();
-
-$dispatcher->listen(Binding::class, function (Binding $event) {
- // Do something with the Binding event information:
-
- $event->connection; // Adldap\Connections\Ldap instance
- $event->username; // 'jdoe@acme.org'
- $event->password; // 'super-secret'
-});
-```
-
-The first argument is the event name you would like to listen for, and the
-second is either a closure or class name that should handle the event:
-
-Using a class:
-
-> **Note**: When using just a class name, the class must contain a public `handle()` method that will handle the event.
-
-```php
-use Adldap\Adldap;
-use Adldap\Auth\Events\Binding;
-
-$dispatcher = Adldap::getEventDispatcher();
-
-$dispatcher->listen(Binding::class, MyApp\BindingEventHandler::class);
-```
-
-```php
-namespace MyApp;
-
-use Adldap\Auth\Events\Binding;
-
-class BindingEventHandler
-{
- public function handle(Binding $event)
- {
- // Handle the event...
- }
-}
-```
-
-## Model Events
-
-Model events are handled the same way as authentication events.
-
-Simply call the event dispatcher `listen()` method with the model event you are wanting to listen for:
-
-```php
-use Adldap\Models\Events\Saving;
-
-$dispatcher = \Adldap\Adldap::getEventDispatcher();
-
-$dispatcher->listen(Saving::class, function (Saving $event) {
- // Do something with the Saving event information:
-
- // Returns the model instance being saved eg. `Adldap\Models\Entry`
- $event->getModel();
-});
-```
-
-## Wildcard Event Listeners
-
-You can register listeners using the `*` as a wildcard parameter to catch multiple events with the same listener.
-
-Wildcard listeners will receive the event name as their first argument, and the entire event data array as their second argument:
-
-```php
-$dispatcher = Adldap::getEventDispatcher();
-
-// Listen for all model events.
-$dispatcher->listen('Adldap\Models\Events\*', function ($eventName, array $data) {
- echo $eventName; // Returns 'Adldap\Models\Events\Updating'
- var_dump($data); // Returns [0] => (object) Adldap\Models\Events\Updating;
-});
-
-$user = $provider->search()->users()->find('jdoe');
-
-$user->setTelephoneNumber('555 555-5555');
-
-$user->save();
-```
-
-## Determining the Connection
-
-If you're using multiple LDAP connections and you require the ability to determine which events belong
-to a certain connection, you can do so by verifying the host of the LDAP connection.
-
-Here's an example:
-
-```php
-$dispatcher = Adldap::getEventDispatcher();
-
-$dispatcher->listen(\Adldap\Models\Events\Creating::class, function ($event) {
- $connection = $event->model->getConnection();
-
- $host = $connection->getHost();
-
- echo $host; // Displays 'ldap://192.168.1.1:386'
-});
-```
-
-Another example with auth events:
-
-```php
-$dispatcher = Adldap::getEventDispatcher();
-
-$dispatcher->listen(\Adldap\Auth\Events\Binding::class, function ($event) {
- $connection = $event->connection;
-
- $host = $connection->getHost();
-
- echo $host; // Displays 'ldap://192.168.1.1:386'
-});
-```
-
-## List of Events
-
-### Authentication Events
-
-There are several events that are fired during initial and subsequent binds to your configured LDAP server.
-
-Here is a list of all events that are fired:
-
-| Event| Description |
-|---|---|
-| Adldap\Auth\Events\Attempting | When any authentication attempt is called via: `$provider->auth()->attempt()` |
-| Adldap\Auth\Events\Passed | When any authentication attempts pass via: `$provider->auth()->attempt()` |
-| Adldap\Auth\Events\Failed | When any authentication attempts fail via: `$provider->auth()->attempt()` *Or* `$provider->auth()->bind()` |
-| Adldap\Auth\Events\Binding | When any LDAP bind attempts occur via: `$provider->auth()->attempt()` *Or* `$provider->auth()->bind()` |
-| Adldap\Auth\Events\Bound | When any LDAP bind attempts are successful via: `$provider->auth()->attempt()` *Or* `$provider->auth()->bind()` |
-
-### Model Events
-
-There are several events that are fired during the creation, updating and deleting of all models.
-
-Here is a list of all events that are fired:
-
-| Event | Description |
-|---|---|
-| Adldap\Models\Events\Saving | When a model is in the process of being saved via: `$model->save()` |
-| Adldap\Models\Events\Saved | When a model has been successfully saved via: `$model->save()` |
-| Adldap\Models\Events\Creating | When a model is being created via: `$model->save()` *Or* `$model->create()` |
-| Adldap\Models\Events\Created | When a model has been successfully created via: `$model->save()` *Or* `$model->create()` |
-| Adldap\Models\Events\Updating | When a model is being updated via: `$model->save()` *Or* `$model->update()` |
-| Adldap\Models\Events\Updated | When a model has been successfully updated via: `$model->save()` *Or* `$model->update()` |
-| Adldap\Models\Events\Deleting | When a model is being deleted via: `$model->delete()` |
-| Adldap\Models\Events\Deleted | When a model has been successfully deleted via: `$model->delete()` |
\ No newline at end of file
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/index.html b/data/web/inc/lib/vendor/adldap2/adldap2/docs/index.html
deleted file mode 100644
index adf939bd9..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/index.html
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- Adldap2 Documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/installation.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/installation.md
deleted file mode 100644
index de21239e5..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/installation.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Requirements
-
-Adldap2 requires the following:
-
-- PHP 7.0 or greater
-- LDAP extension enabled in PHP
-- An LDAP server (ActiveDirectory, OpenLDAP, FreeIPA etc.)
-
-# Composer
-
-Adldap2 uses [Composer](https://getcomposer.org) for installation.
-
-Once you have composer installed, run the following command in the root directory of your project:
-
-```bash
-composer require adldap2/adldap2
-```
-
-Then, if your application doesn't already require Composer's autoload, you will need to do it manually.
-
-Insert this line at the top of your projects PHP script (usually `index.php`):
-
-```php
-require __DIR__ . '/vendor/autoload.php';
-```
-
-You're all set!
-
-Now, head over to the [setup guide](setup.md) to get up and running.
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/logging.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/logging.md
deleted file mode 100644
index b49bcd3a3..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/logging.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# Logging
-
-Adldap2 includes an implementation of PSR's widely supported [Logger](https://github.com/php-fig/log) interface.
-
-By default, all of Adldap2's [events](events.md) will call the logger you have set to utilize.
-
-> **Note**: Adldap2 does not include a file / text logger. You must implement your own.
-
-## Registering & Enabling a Logger
-
-To register a logger call `Adldap::setLogger()`. The logger must implement the `Psr\Log\LoggerInterface`.
-
->**Note**: Be sure to set the logger prior to creating a new `Adldap` instance. This
-> ensures all events throughout the lifecycle of the request use your logger.
-
-```php
-use Adldap\Adldap;
-
-Adldap::setLogger($myLogger);
-
-$config = ['...'];
-
-$ad = new Adldap();
-
-$ad->addProvider($config);
-```
-
-## Disabling Logging
-
-If you need to disable the event logger after a certain set of operations, simply pass in `null` and logging will be disabled:
-
-```php
-use Adldap\Adldap;
-
-Adldap::setLogger($myLogger);
-
-$config = ['...'];
-
-$ad = new Adldap();
-
-$ad->addProvider($config);
-
-try {
- $ad->connect();
-
- // Disable logging anything else.
- Adldap::setLogger(null);
-} catch (\Adldap\Connections\BindException $e) {
- //
-}
-```
-
-## Logged Information
-
-Here is a list of events that are logged along with the information included:
-
-| Authentication Events | Logged |
-|---|---|
-| `Adldap\Auth\Events\Attempting` | `LDAP (ldap://192.168.1.1:389) - Operation: Adldap\Auth\Events\Attempting - Username: CN=Steve Bauman,OU=Users,DC=corp,DC=acme,DC=org` |
-| `Adldap\Auth\Events\Binding` |` LDAP (ldap://192.168.1.1:389) - Operation: Adldap\Auth\Events\Binding - Username: CN=Steve Bauman,OU=Users,DC=corp,DC=acme,DC=org` |
-| `Adldap\Auth\Events\Bound` | `LDAP (ldap://192.168.1.1:389) - Operation: Adldap\Auth\Events\Bound - Username: CN=Steve Bauman,OU=Users,DC=corp,DC=acme,DC=org` |
-| `Adldap\Auth\Events\Passed` | `LDAP (ldap://192.168.1.1:389) - Operation: Adldap\Auth\Events\Passed - Username: CN=Steve Bauman,OU=Users,DC=corp,DC=acme,DC=org` |
-| `Adldap\Auth\Events\Failed` | `LDAP (ldap://192.168.1.1:389) - Operation: Adldap\Auth\Events\Failed - Username: CN=Steve Bauman,OU=Users,DC=corp,DC=acme,DC=org - Result: Invalid Credentials` |
-
-| Model Events | Logged |
-|---|---|
-| `Adldap\Models\Events\Saving` | `LDAP (ldap://192.168.1.1:389) - Operation: Saving - On: Adldap\Models\User - Distinguished Name: cn=John Doe,dc=acme,dc=org` |
-| `Adldap\Models\Events\Saved` | `LDAP (ldap://192.168.1.1:389) - Operation: Saved - On: Adldap\Models\User - Distinguished Name: cn=John Doe,dc=acme,dc=org` |
-| `Adldap\Models\Events\Creating` | `LDAP (ldap://192.168.1.1:389) - Operation: Creating - On: Adldap\Models\User - Distinguished Name: cn=John Doe,dc=acme,dc=org` |
-| `Adldap\Models\Events\Created` | `LDAP (ldap://192.168.1.1:389) - Operation: Created - On: Adldap\Models\User - Distinguished Name: cn=John Doe,dc=acme,dc=org` |
-| `Adldap\Models\Events\Updating` | `LDAP (ldap://192.168.1.1:389) - Operation: Updating - On: Adldap\Models\User - Distinguished Name: cn=John Doe,dc=acme,dc=org` |
-| `Adldap\Models\Events\Updated` | `LDAP (ldap://192.168.1.1:389) - Operation: Updated - On: Adldap\Models\User - Distinguished Name: cn=John Doe,dc=acme,dc=org` |
-| `Adldap\Models\Events\Deleting` | `LDAP (ldap://192.168.1.1:389) - Operation: Deleting - On: Adldap\Models\User - Distinguished Name: cn=John Doe,dc=acme,dc=org` |
-| `Adldap\Models\Events\Deleted` | `LDAP (ldap://192.168.1.1:389) - Operation: Deleted - On: Adldap\Models\User - Distinguished Name: cn=John Doe,dc=acme,dc=org` |
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/media/bg.svg b/data/web/inc/lib/vendor/adldap2/adldap2/docs/media/bg.svg
deleted file mode 100644
index e70e86334..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/media/bg.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/computer.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/computer.md
deleted file mode 100644
index e3057abf7..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/computer.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# The Computer Model
-
-> **Note**: This model contains the traits `HasDescription`, `HasLastLogonAndLogOff` & `HasCriticalSystemObject`.
-> For more information, visit the documentation:
->
-> [HasDescription](/models/traits/has-description.md),
-> [HasLastLogonAndLogOff](/models/traits/has-last-login-last-logoff.md),
-> [HasCriticalSystemObject](/models/traits/has-critical-system-object.md)
-
-## Methods
-
-```php
-$computer = $provider->search()->computers()->find('ACME-EXCHANGE');
-
-// Returns 'Windows Server 2003'
-$computer->getOperatingSystem();
-
-// Returns '5.2 (3790)';
-$computer->getOperatingSystemVersion();
-
-// Returns 'Service Pack 1';
-$computer->getOperatingSystemServicePack();
-
-// Returns 'ACME-DESKTOP001.corp.acme.org'
-$computer->getDnsHostName();
-
-$computer->getLastLogOff();
-
-$computer->getLastLogon();
-
-$computer->getLastLogonTimestamp();
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/contact.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/contact.md
deleted file mode 100644
index e42c8f7b7..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/contact.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# The Contact Model
-
-The Contact model extends from the base `Adldap\Models\Model` class and contains
-no specific methods / attributes that are limited to it.
-
-## Creation
-
-```php
-// Adldap\Models\Contact
-$contact = $provider->make()->contact([
- 'cn' => 'Suzy Doe',
-]);
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/container.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/container.md
deleted file mode 100644
index 132b54983..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/container.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# The Container Model
-
-> **Note**: This model contains the trait `HasDescription` & `HasCriticalSystemObject`.
-> For more information, visit the documentation:
->
-> [HasDescription](/models/traits/has-description.md),
-> [HasCriticalSystemObject](/models/traits/has-critical-system-object.md),
-
-## Creation
-
-```php
-// Adldap\Models\Container
-$container = $provider->make()->container([
- 'cn' => 'VPN Users',
-]);
-```
-
-## Methods
-
-The `Container` model contains only one unique method.
-
-```php
-$flags = $container->getSystemFlags();
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/group.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/group.md
deleted file mode 100644
index cf7c6d4f6..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/group.md
+++ /dev/null
@@ -1,253 +0,0 @@
-# The Group Model
-
-> **Note**: This model contains the trait `HasMemberOf`.
-> For more information, visit the documentation:
->
-> [HasMemberOf](/models/traits/has-member-of.md)
-
-## Creation
-
-```php
-// Adldap\Models\Group
-$group = $provider->make()->group([
- 'cn' => 'Managers',
-]);
-
-// Create group's DN through the DN Builder:
-$group = $provider->make()->group();
-
-$dn = $group->getDnBuilder();
-
-$dn->addOu('Workstation Computers');
-
-$dn->addCn("Managers");
-
-$group->setDn($dn);
-
-// Or set the DN manually:
-$ou->setDn('cn=Managers,ou=Workstation Computers,dc=test,dc=local,dc=com');
-
-$group->save();
-```
-
-## Getting a groups members
-
-When you receive a `Group` model instance, it will contain a `member`
-attribute which contains the distinguished names of all
-the members inside the group.
-
-```php
-$group = $provider->search()->groups()->first();
-
-foreach ($group->members as $member) {
- echo $member; // 'cn=John Doe,dc=corp,dc=acme,dc=org'
-}
-```
-
-But this might not be useful, since we might actually want the models for each member.
-
-This can be easily done with the `getMembers()` method on the group.
-
-```php
-$group = $provider->search()->groups()->first();
-
-foreach ($group->getMembers() as $member) {
- echo get_class($member); // Instance of `Adldap\Models\Model`
-
- echo $member->getCommonName();
-}
-```
-
-> **Note**: You should be aware however, that calling the `getMembers()` method will
-> query your `AD` server for **every** member contained in the group to retrieve
-> its model. For larger group sets it may be worth paginating them.
-
-
-### Paginating Group Members
-
-The group you're looking for might contain hundreds / thousands of members.
-
-In this case, your server might only return you a portion of the groups members.
-
-To get around this limit, you need to ask your server to paginate the groups members through a select:
-
-```php
-$group = $provider->search()->groups()->select('member;range=0-500')->first();
-
-foreach ($group->members as $member) {
- // We'll only have 500 members in this query.
-}
-```
-
-Now, when we have the group instance, we'll only have the first `500` members inside this group.
-However, calling the `getMembers()` method will automatically retrieve the rest of the members for you:
-
-```php
-$group = $provider->search()->groups()->select('member;range=0-500')->first();
-
-foreach ($group->getMembers() as $member) {
- // Adldap will automatically retrieve the next 500
- // records until it's retrieved all records.
- $member->getCommonName();
-}
-```
-
-> **Note**: Groups containing large amounts of users (1000+) will require
-> more memory assigned to PHP. Your mileage will vary.
-
-#### Paginating large sets of Group Members
-
-When requesting group members from groups that contain a large amount of members
-(typically over 1000), you may receive PHP memory limit errors due to
-the large amount of the objects being created in the request.
-
-To resolve this, you will need to retrieve the members manually. However using
-this route you will only be able to retrieve the members distinguished names.
-
-```php
-$from = 0;
-$to = 500;
-$range = "member;range=$from-$to";
-
-// Retrieve the group.
-$group = $provider->search()->select($range)->raw()->find('Accounting');
-
-// Remove the count from the member array.
-unset($group[$range]['count']);
-
-// The array of group members distinguished names.
-$members = $group[$range];
-
-foreach ($members as $member) {
- echo $member; // 'cn=John Doe,dc=acme,dc=org'
-}
-```
-
-You can then encapsulate the above example into a recursive function to retrieve the remaining group members.
-
-## Getting only a groups member names
-
-To retrieve only the names of the members contained in a group, call the `getMemberNames()` method:
-
-```php
-foreach ($group->getMemberNames() as $name) {
- // Returns 'John Doe'
- echo $name;
-}
-```
-
-> **Note**: This method does not query your server for each member to retrieve its name. It
-> only parses the distinguished names from the groups `member` attribute. This means that
-> if you have paginated group members, you will need to perform another query yourself
-> to retrieve the rest of the member names (or just call the `getMembers()` method).
-
-## Setting Group Members
-
-To set members that are apart of the group, you can perform this in two ways:
-
-> **Note**: Remember, this will remove **all** pre-existing members, and set the new given members on the group.
-
-```php
-$members = [
- 'cn=John Doe,dc=corp,dc=acme,dc=org',
- 'cn=Jane Doe,dc=corp,dc=acme,dc=org',
-];
-
-$group->setMembers($members);
-
-$group->save();
-```
-
-Or manually:
-
-```php
-$group->member = [
- 'cn=John Doe,dc=corp,dc=acme,dc=org',
- 'cn=Jane Doe,dc=corp,dc=acme,dc=org',
-];
-
-$group->save();
-```
-
-## Adding One Member
-
-To add a single member to a group, use the `addMember()` method:
-
-> **Note**: You do not need to call the `save()` method after adding a
-> member. It's automatically called so you can determine
-> if the member was successfully added.
-
-```php
-// We can provide a model, or just a plain DN of the new member
-$user = $provider->search()->users()->first();
-
-if ($group->addMember($user)) {
- // User was successfully added to the group!
-}
-
-// Or
-
-$user = 'cn=John Doe,dc=corp,dc=acme,dc=org';
-
-if ($group->addMember($user)) {
- //
-}
-```
-
-## Adding Multiple Group Members
-
-To add multiple members to a group, use the `addMembers()` method:
-
-> **Note**: You do not need to call the `save()` method after adding
-> members. It's automatically called so you can determine
-> if the members were successfully added.
-
-```php
-$members = [
- 'cn=John Doe,dc=corp,dc=acme,dc=org',
- 'cn=Jane Doe,dc=corp,dc=acme,dc=org',
-];
-
-$group->addMembers($members);
-
-// Or
-
-$user = $provider->search()->users()->first();
-
-if ($group->addMembers($user)) {
- //
-}
-```
-
-## Removing One Member
-
-To remove a single member to a group, use the `removeMember()` method:
-
-```php
-// We can provide a model, or just a plain DN of the existing member
-$group = $provider->search()->groups()->first();
-
-$member = $group->getMembers()->first();
-
-if ($group->removeMember($member)) {
- // Member was successfully removed from the group!
-}
-
-// Or
-
-$user = 'cn=John Doe,dc=corp,dc=acme,dc=org';
-
-if ($group->removeMember($user)) {
- //
-}
-```
-
-## Removing All Members
-
-To remove all members, use the `removeMembers()` method:
-
-```php
-if ($group->removeMembers()) {
- // All members were successfully removed!
-}
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/model.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/model.md
deleted file mode 100644
index fbcecc8b9..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/model.md
+++ /dev/null
@@ -1,655 +0,0 @@
-# Creating / Updating
-
-## Introduction
-
-Adldap2 implements the [ActiveRecord](https://en.wikipedia.org/wiki/Active_record_pattern) pattern.
-This means that each LDAP record in your directory is represented as it's own model instance.
-
-## Creating
-
-Creating LDAP entries manually is always a pain, but Adldap2 makes it effortless. Let's get started.
-
-When you have a provider instance, call the `make()` method. This returns an `Adldap\Models\Factory` instance:
-
-```php
-$factory = $provider->make();
-```
-
-Or you can chain all methods if you'd prefer:
-
-```php
-$user = $provider->make()->user();
-```
-
-### Available Make Methods
-
-When calling a make method, all of them accept an `$attributes` parameter
-to fill the model with your specified attributes.
-
-```php
-// Adldap\Models\User
-$user = $provider->make()->user([
- 'cn' => 'John Doe',
-]);
-
-// Adldap\Models\Computer
-$computer = $provider->make()->computer([
- 'cn' => 'COMP-101',
-]);
-
-// Adldap\Models\Contact
-$contact = $provider->make()->contact([
- 'cn' => 'Suzy Doe',
-]);
-
-// Adldap\Models\Container
-$container = $provider->make()->container([
- 'cn' => 'VPN Users',
-]);
-
-// Adldap\Models\Group
-$group = $provider->make()->group([
- 'cn' => 'Managers',
-]);
-
-// Adldap\Models\OrganizationalUnit
-$ou = $provider->make()->ou([
- 'name' => 'Acme',
-]);
-```
-
-## Saving
-
-When you have any model instance, you can call the `save()` method to persist the
-changes to your server. This method returns a `boolean`. For example:
-
-```php
-$user = $provider->make()->user([
- 'cn' => 'New User',
-]);
-
-if ($user->save()) {
- // User was saved.
-} else {
- // There was an issue saving this user.
-}
-```
-
-> **Note**: When a model is saved successfully (whether created or updated), the
-> models attributes are re-synced in the background from your LDAP server.
->
-> This allows you to perform other operations during the same
-> request that require an existing model.
-
-### Creating (Manually)
-
-If you are sure the model **does not exist** already inside your LDAP directory, you can use the `create()` method:
-
-```php
-$user = $provider->make()->user([
- 'cn' => 'New User',
-]);
-
-if ($user->create()) {
- // User was created.
-} else {
- // There was an issue creating this user.
-}
-```
-
-> **Note**: When you call the create method, if the model does not have a
-> distinguished name, one will automatically be generated for you using your
-> `base_dn` set in your configuration and the models common name.
-
-### Updating (Manually)
-
-If you are sure the model **does exist** already inside your LDAP directory, you can use the `update()` method:
-
-```php
-$user = $provider->search()->whereEquals('cn', 'John Doe')->firstOrFail();
-
-$user->displayName = 'Suzy Doe';
-
-if ($user->update()) {
- // User was updated.
-} else {
- // There was an issue updating this user.
-}
-```
-
-## Checking Existence
-
-If you need to check the existence of a model, use the property `exists`.
-
-How does it know if the model exists in your LDAP directory? Well, when models are constructed from
-search results, the `exists` property on the model is set to `true`.
-
-```php
-$user = $provider->search()->find('jdoe');
-
-$user->exists; // Returns true.
-
-if ($user->delete()) {
- $user->exists; // Returns false.
-}
-```
-
-If a model is created successfully, the `exists` property is set to `true`:
-
-```php
-$user = $provider->make()->user([
- 'cn' => 'John Doe',
-]);
-
-$user->exists; // Returns false.
-
-if ($user->save()) {
- $user->exists; // Returns true.
-}
-```
-
-## Attributes
-
-Due to LDAPs multi-valued nature, all LDAP attributes inside a model have their own array.
-
-For example, a models attributes may contain the following:
-
-```php
-var_dump($user->getAttributes());
-
-// Returns:
-/*
-[
- 'cn' => [
- 0 => 'John Doe',
- ],
- 'sn' => [
- 0 => 'Doe',
- ],
- 'givenname' => [
- 0 => 'John'
- ],
- 'useraccountcontrol' => [
- 0 => 512
- ],
- 'mail' => [
- 0 => 'jdoe@acme.org',
- 1 => 'john-doe@acme.org',
- ],
- 'memberof' => [
- 0 => 'cn=Accountants,ou=Groups,dc=acme,dc=org',
- 1 => 'cn=Employees,ou=Groups,dc=acme,dc=org',
- 2 => 'cn=Users,ou=Groups,dc=acme,dc=org',
- ],
-]
-*/
-```
-
-You can notice in the above dumped array that each attribute contains
-its own array with a value assigned to the first key.
-
-Since all models extend from the base class `Adldap\Models\Model`, there
-are many useful methods that you can use on every model to easily
-retrieve these attributes you're looking for.
-
-### Getting Attributes
-
-You can get attributes in a few ways:
-
-```php
-// Returns an array all of the users attributes.
-$user->getAttributes();
-
-// Returns an array of all the users email addresses.
-// Returns `null` if non-existent.
-$user->getAttribute('mail');
-
-// Returns the users first email address.
-// Returns `null` if non-existent.
-$user->getAttribute('mail', 0);
-
-// Returns the users first email address.
-// Returns `null` if non-existent.
-$user->getFirstAttribute('mail');
-
-// Returns an array of all the users email addresses.
-$user->mail;
-
-// Returns the users first email address.
-$user->mail[0];
-```
-
-#### Using a Getter
-
-Some attributes have methods for easier retrieval so you don't need to look up the LDAP attribute name.
-
-For example, to retrieve a users email address, use the method `getEmail()`:
-
-```php
-$user->getEmail();
-```
-
-##### Other Methods
-
-The following methods are available on all returned models:
-
-```php
-// Returns the model's 'name' attribute.
-$model->getName();
-
-// Returns the model's 'cn' attribute.
-$model->getCommonName();
-
-// Returns the model's 'displayname' attribute.
-$model->getDisplayName();
-
-// Returns the model's 'samaccountname' attriubte.
-$model->getAccountName();
-
-// Returns the model's 'samaccounttype` attribute.
-$model->getAccountType();
-
-// Returns the model's 'whencreated` attribute.
-$model->getCreatedAt();
-
-// Returns the model's 'whencreated` attribute in a MySQL timestamp format.
-$model->getCreatedAtDate();
-
-// Returns the model's 'whencreated' attribute in unix time.
-$model->getCreatedAtTimestamp();
-
-// Returns the model's 'whenchanged` attribute.
-$model->getUpdatedAt();
-
-// Returns the model's 'whenchanged` attribute in a MySQL timestamp format.
-$model->getUpdatedAtDate();
-
-// Returns the model's 'whenchanged` attribute in unix time.
-$model->getUpdatedAtTimestamp();
-
-// Returns the model's 'objectclass' attribute.
-$model->getObjectClass();
-
-// Returns the model's root object category string.
-$model->getObjectCategory();
-
-// Returns the model's object category in an array.
-$model->getObjectCategoryArray();
-
-// Returns the model's object category distinguished name.
-$model->getObjectCategoryDn();
-
-// Returns the model's SID in binary.
-$model->getObjectSid();
-
-// Returns the model's GUID in binary.
-$model->getObjectGuid();
-
-// Returns the model's SID in a string.
-$model->getConvertedSid();
-
-// Returns the model's GUID in a string.
-$model->getConvertedGuid();
-
-// Returns the model's primary group ID.
-$model->getPrimaryGroupId();
-
-// Returns the model's 'instancetype' attribute.
-$model->getInstanceType();
-
-// Returns the model's 'maxpwdage' attribute.
-$model->getMaxPasswordAge();
-```
-
-For more documentation on specific getters, please take a look at the relevant model documentation.
-
-#### Getting Dirty (Modified) Attributes
-
-You can get a models modified attributes using the `getDirty()` method:
-
-```php
-$user = $provider->search()->users()->find('john');
-
-// Returns array [0 => 'John Doe']
-var_dump($user->cn);
-
-$user->setAttribute('cn', 'Jane Doe');
-
-// Returns array ['cn' => [0 => 'Jane Doe']]
-var_dump($user->getDirty());
-
-// The attribute has been modified - returns array [0 => 'Jane Doe']
-var_dump($user->cn);
-```
-
-The method returns an array with the key being the modified attribute,
-and the array being the new values of the attribute.
-
-#### Getting Original (Unmodified) Attributes
-
-You can get a models original attributes using the `getOriginal()` method:
-
-```php
-$user = $provider->search()->users()->find('john');
-
-// Returns array [0 => 'John Doe']
-var_dump($user->cn);
-
-$user->setAttribute('cn', 'Jane Doe');
-
-// The attribute has been modified - returns array [0 => 'Jane Doe']
-var_dump($user->cn);
-
-// Retrieving the original value - returns array [0 => 'John Doe']
-var_dump($user->getOriginal()['cn']);
-```
-
-> **Note**: Keep in mind, when you `save()` a model, the models original
-> attributes will be re-synchronized to the models new attributes.
-
-### Setting Attributes
-
-Just like getting model attributes, there's multiple ways of setting attributes as well:
-
-```php
-// Setting via method:
-$user->setAttribute('cn', 'John Doe');
-
-// Specifying a subkey for overwriting specific attributes:
-$user->setAttribute('mail', 'other-mail@mail.com', 0);
-
-// Setting the first attribute:
-$user->setFirstAttribute('mail', 'jdoe@mail.com');
-
-// Setting via property:
-$user->cn = 'John Doe';
-
-// Mass setting attributes:
-$user->fill([
- 'cn' => 'John Doe',
- 'mail' => 'jdoe@mail.com',
-]);
-```
-
-#### Setting Boolean Attributes
-
-When setting boolean attribute values, you cannot use `0` / `1` / `true` / `false` as these
-are simply converted to integer values when saving and your LDAP server will
-likely return an error for doing so on certain attributes.
-
-You will need to use the string versions of the boolean (`'TRUE'` / `'FALSE'`) for the
-boolean attribute to be set properly on your LDAP server.
-
-Here's an example:
-
-```php
-$user->setFirstAttribute('msExchHideFromAddressLists', 'TRUE');
-
-$user->save();
-```
-
-### Creating Attributes
-
-To create an attribute that does not exist on the model, you can set it like a regular property:
-
-```php
-$user = $provider->search()->whereEquals('cn', 'John Doe')->firstOrFail();
-
-$user->new = 'New Attribute';
-
-$user->save();
-```
-
-If the set attribute does not exist on the model already,
-it will automatically be created when you call the `save()` method.
-
-If you'd like manually create new attributes individually, call the `createAttribute($attribute, $value)` method:
-
-```php
-if ($user->createAttribute('new', 'New Attribute')) {
- // Attribute created.
-}
-```
-
-### Updating Attributes
-
-To modify an attribute you can either use a setter method, or by setting it manually:
-
-> **Note**: You can also utilize setters to create new attributes if your model does not already have the attribute.
-
-```php
-$user = $provider->search()->whereEquals('cn', 'John Doe')->firstOrFail();
-
-$user->cn = 'New Name';
-
-// Or use a setter:
-
-$user->setCommonName('New Name');
-
-$user->save();
-```
-
-If you'd like to update attributes individually, call the `updateAttribute($attribute, $value)` method:
-
-```php
-if ($user->updateAttribute('cn', 'New Name')) {
- // Successfully updated attribute.
-}
-```
-
-### Removing Attributes
-
-To remove attributes, set the attribute to `NULL`:
-
-```php
-$user->cn = null;
-
-$user->save();
-```
-
-Or, you can call the `deleteAttribute($attribute)` method:
-
-```php
-if ($user->deleteAttribute('cn')) {
- // Attribute has been deleted.
-}
-```
-
-### Checking Attributes
-
-#### Checking Existence of Attributes
-
-To see if a model contains an attribute, use the method `hasAttribute()`:
-
-```php
-// Checking if a base attribute exists:
-if ($user->hasAttribute('mail')) {
- // This user contains an email address.
-}
-
-// Checking if a sub attribute exists, by key:
-if ($user->hasAttribute('mail', 1)) {
- // This user contains a second email address.
-}
-```
-
-#### Counting the Models Attributes
-
-To retrieve the total number of attributes, use the method `countAttributes()`:
-
-```php
-$count = $user->countAttributes();
-
-var_dump($count); // Returns int
-```
-
-#### Checking if a Model is contained in an OU
-
-To check if a model is located inside an OU, use the `inOu()` method:
-
-```php
-if ($model->inOu('User Accounts')) {
- // This model is inside the 'User Accounts' OU.
-}
-```
-
-You can also use an OU model instance:
-
-```php
-$serviceAccounts = $provider->search()->ous()->find('Service Accounts');
-
-if ($model->inOu($serviceAccounts)) {
- // This model is inside the 'Service Accounts' OU.
-}
-```
-
-#### Checking if a Model is Writable
-
-To check if the model can be written to, use the method `isWritable()`:
-
-```php
-if ($model->isWritable()) {
- // You can modify this model.
-}
-```
-
-### Force Re-Syncing A Models Attributes
-
-If you need to forcefully re-sync a models attributes, use the method `syncRaw()`:
-
-```php
-$user->syncRaw();
-```
-
-> **Note**: This will query your LDAP server for the current model, and re-synchronize
-> it's attributes. This is only recommended if your creating / updating / deleting
-> attributes manually through your LDAP connection.
-
-## Moving / Renaming
-
-To move a user from one DN or OU to another, use the `move()` method:
-
-> **Note**: The `move()` method is actually an alias for the `rename()` method.
-
-```php
-// New parent distiguished name.
-$newParentDn = 'OU=New Ou,DC=corp,DC=local';
-
-if ($user->move($newParentDn)) {
- // User was successfully moved to the new OU.
-}
-```
-
-You can also provide a model to move the child model into:
-
-```php
-// New parent OU.
-$newParentOu = $provider->search()->ous()->find('Accounting');
-
-if ($user->move($newParentOu)) {
- // User was successfully moved to the new OU.
-}
-```
-
-If you would like to keep the models old RDN along side their new RDN, pass in false in the second parameter:
-
-```php
-// New parent distiguished name.
-$newParentDn = 'OU=New Ou,DC=corp,DC=local';
-
-if ($user->move($newParentDn, $deleteOldRdn = false)) {
- // User was successfully moved to the new OU,
- // and their old RDN has been left in-tact.
-}
-```
-
-To rename a users DN, just pass in their new relative distinguished name in the `rename()` method:
-
-```php
-$newRdn = 'cn=New Name';
-
-if ($user->rename($newRdn)) {
- // User was successfully renamed.
-}
-```
-
-## Deleting
-
-To delete a model, just call the `delete()` method:
-
-```php
-$user = $provider->search()->whereEquals('cn', 'John Doe')->firstOrFail();
-
-echo $user->exists; // Returns true.
-
-if ($user->delete()) {
- // Successfully deleted user.
-
- echo $user->exists; // Returns false.
-}
-```
-
-## Extending
-
-> **Note**: This feature was introduced in `v8.0.0`.
-
-To use your own models, you will need to create a new [Schema](../schema.md).
-
-Once you have created your own schema, you must insert it inside the construct of your provider.
-
-Let's walk through this process.
-
-First we'll create our model we'd like to extend / override:
-
-> **Note**: Your custom model **must** extend from an existing Adldap2 model.
-> This is due to methods and attributes that only exist on these classes.
-
-```php
-namespace App\Ldap\Models;
-
-use Adldap\Models\User as Model;
-
-class User extends Model
-{
- public function getCommonName()
- {
- // Overriding model method.
- }
-}
-```
-
-Now, we'll create our custom schema and return our models class name:
-
-```php
-namespace App\Ldap\Schemas;
-
-use App\Ldap\Models\User;
-
-class LdapSchema extends ActiveDirectory
-{
- public function userModel()
- {
- return User::class;
- }
-}
-```
-
-Finally, when we create a provider, we need to insert our Schema into the configuration:
-
-```php
-$config = [
- 'hosts' => ['...'],
-
- 'username' => 'admin',
- 'password' => 'P@ssword',
-
- 'schema' => MyApp\LdapSchema::class,
-];
-
-$ad = new Adldap($config);
-
-$provider = $ad->connect();
-
-// If `jdoe` exists, your custom model will be returned.
-$user = $provider->search()->users()->find('jdoe');
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/organization.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/organization.md
deleted file mode 100644
index 57c00e33d..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/organization.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# The Organization Model
-
-The Organization model extends from the base `Adldap\Models\Model` class and contains
-no specific methods / attributes that are limited to it.
-
-## Creation
-
-```php
-// Adldap\Models\Organization
-$org = $provider->make()->organization([
- 'o' => 'Some Company',
-]);
-
-// Set the DN manually:
-
-$org->setDn('o=Some Company,dc=test,dc=local,dc=com');
-
-$org->save();
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/ou.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/ou.md
deleted file mode 100644
index ec473b1a1..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/ou.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# The OrganizationalUnit Model
-
-The OrganizationalUnit model extends from the base `Adldap\Models\Model` class and contains
-no specific methods / attributes that are limited to it.
-
-## Creation
-
-```php
-// Adldap\Models\OrganizationalUnit
-$ou = $provider->make()->ou([
- 'name' => 'Workstation Computers',
-]);
-
-// Generate the OU's DN through the DN Builder:
-
-$dn = $ou->getDnBuilder();
-
-$dn->addOu('Workstation Computers');
-
-$ou->setDn($dn);
-
-// Or set the DN manually:
-
-$ou->setDn('ou=Workstation Computers,dc=test,dc=local,dc=com');
-
-$ou->save();
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/printer.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/printer.md
deleted file mode 100644
index 4adc6664a..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/printer.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# The Printer Model
-
-## Methods
-
-```php
-$printer->getPrinterName();
-
-$printer->getPrinterShareName();
-
-$printer->getMemory();
-
-$printer->getUrl();
-
-$printer->getLocation();
-
-$printer->getServerName();
-
-$printer->getColorSupported();
-
-$printer->getDuplexSupported();
-
-$printer->getMediaSupported();
-
-$printer->getStaplingSupported();
-
-$printer->getPrintBinNames();
-
-$printer->getPrintMaxResolution();
-
-$printer->getPrintOrientations();
-
-$printer->getDriverName();
-
-$printer->getDriverVersion();
-
-$printer->getPriority();
-
-$printer->getPrintStartTime();
-
-$printer->getPrintEndTime();
-
-$printer->getPortName();
-
-$printer->getVersionNumber();
-
-$printer->getPrintRate();
-
-$printer->getPrintRateUnit();
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/root-dse.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/root-dse.md
deleted file mode 100644
index e798c0eb1..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/root-dse.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# The RootDse Model
-
-## Getting the Root DSE
-
-To get the Root DSE of your LDAP server, call the `getRootDse()` method off a new search:
-
-```php
-$rootDse = $provider->search()->getRootDse();
-```
-
-## Getting the schema naming context
-
-To get the Root DSE schema naming context, call the `getSchemaNamingContext()`:
-
-```php
-$rootDse = $provider->search()->getRootDse();
-
-$context = $rootDse->getSchemaNamingContext();
-
-// Returns 'cn=Schema,cn=Configuration,dc=corp,dc=acme,dc=org'
-echo $context;
-```
-
-## Getting the root domain naming context
-
-To get the Root DSE domain naming context, call the `getRootDomainNamingContext()`:
-
-```php
-$context = $rootDse->getRootDomainNamingContext();
-
-// Returns 'dc=corp,dc=acme,dc=org'
-echo $context;
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-critical-system-object.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-critical-system-object.md
deleted file mode 100644
index 095acad6f..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-critical-system-object.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# HasCriticalSystemObject Trait
-
-Models that contain this trait, have the `isCriticalSystemObject` attribute.
-
-There is only one method that accompanies this trait:
-
-```php
-if ($model->isCriticalSystemObject()) {
-
- //
-
-}
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-description.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-description.md
deleted file mode 100644
index 5c26d02b5..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-description.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# HasDescription Trait
-
-Models that contain this trait, have the `description` attribute.
-
-There are only two methods that accompany this trait:
-
-```php
-$model->getDescription();
-
-$model->setDescription('The models description');
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-last-login-last-logoff.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-last-login-last-logoff.md
deleted file mode 100644
index 76078c512..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-last-login-last-logoff.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# HasLastLoginAndLastLogoff Trait
-
-Models that contain this trait have the `lastlogoff`, `lastlogon` and `lastlogontimestamp` attributes.
-
-## Methods
-
-```php
-// Returns the models's last log off attribute.
-$computer->getLastLogOff();
-
-// Returns the models's last log on attribute.
-$computer->getLastLogon();
-
-// Returns the models's last log on timestamp attribute.
-$computer->getLastLogonTimestamp();
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-member-of.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-member-of.md
deleted file mode 100644
index d3063df9e..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/traits/has-member-of.md
+++ /dev/null
@@ -1,166 +0,0 @@
-# HasMemberOf Trait
-
-Models that contain this trait, have the ability to be apart of a group.
-
-There's many helpful methods to assist you in all of the operations related to group membership, let's get started!
-
-## Retrieving Groups
-
-To retrieve the groups that a model is apart of, call the `getGroups()` method:
-
-```php
-$user = $provider->search()->users()->find('jdoe');
-
-$groups = $user->getGroups();
-
-foreach ($groups as $group) {
-
- $group->getCommonName(); // ex. 'Accounting'
-
-}
-```
-
-We can also pass in specific fields we need from the returned groups to speed up our queries.
-
-For example, if we only need the groups common name:
-
-```php
-// Group models will be returned with only their common name.
-$groups = $user->getGroups(['cn']);
-```
-
-However, calling `getGroups()` will only retrieve the models immediate groups (non-recursive).
-
-To retrieve nested groups, pass in `true` into the second parameter:
-
-```php
-$groups = $user->getGroups([], $recursive = true);
-```
-
-## Retrieve Group Names
-
-If you only want the models group names, call the `getGroupNames()` method:
-
-```php
-$names = $user->getGroupNames();
-
-foreach ($names as $name) {
-
- echo $name; // ex. 'Accounting'
-
-}
-```
-
-However, this method will also retrieve only the immediate groups names
-much like the `getGroups()` method. You'll need to pass in `true` in
-the first parameter to retrieve results recursively.
-
-```php
-$names = $user->getGroupNames($recursive = true);
-```
-
-## Checking if the Model is apart of a Group
-
-To check if a model is apart of a certain group, use the `inGroup()` method:
-
-```php
-$group = $provider->search()->groups()->find('Office');
-
-if ($user->inGroup($group)) {
-
- //
-
-}
-```
-
-You can also check for multiple memberships by passing in an array of groups:
-
-```php
-$groups = $provider->search()->findManyBy('cn', ['Accounting', 'Office']));
-
-if ($user->inGroup($groups->toArray()) {
-
- // This user is apart of the 'Accounting' and 'Office' group!
-
-}
-```
-
-> **Note**: Much like the other methods above, you'll need to provide a `$recursive`
-> flag to the `inGroup()` method if you'd like recursive results included.
-
-We can also provide distinguished names instead of Group model instances:
-
-```php
-$dns = [
- 'cn=Accounting,ou=Groups,dc=acme,dc=org',
- 'cn=Office,ou=Groups,dc=acme,dc=org',
-];
-
-if ($user->inGroup($dns, $recursive = true)) {
-
- //
-
-}
-```
-
-Or, we can also just provide the name(s) of the group(s).
-
-```php
-$names = [
- 'Accounting',
- 'Office',
-];
-
-if ($user->inGroup($names, $recursive = true)) {
-
- //
-
-}
-```
-
-## Adding a Group
-
-To add the model to a specific group, call the `addGroup()` method:
-
-```php
-$group = $provider->search()->groups()->find('Accounting');
-
-// You can either provide a Group model:
-if ($user->addGroup($group)) {
-
- //
-
-}
-
-// Or a Groups DN:
-if ($user->addGroup('cn=Accounting,ou=Groups,dc=acme,dc=org')) {
-
- //
-
-}
-```
-
-> **Note**: You do not need to call the `save()` method for adding / removing groups.
-> This is done automatically so you can perform clean `if` statements on the method.
-
-## Removing a Group
-
-To remove the model from a specific group, call the `removeGroup()` method:
-
-```php
-$group = $user->getGroups()->first();
-
-// You can either provide a Group model:
-if ($user->removeGroup($group)) {
-
- //
-
-}
-
-// Or the groups DN:
-if ($user->removeGroup('cn=Accounting,ou=Office Groups,dc=acme,dc=org')) {
-
- //
-
-}
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/user.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/user.md
deleted file mode 100644
index 65576e8dd..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/models/user.md
+++ /dev/null
@@ -1,180 +0,0 @@
-# The User Model
-
-> **Note**: This model contains the trait `HasMemberOf`. For more information, visit the documentation:
-> [HasMemberOfTrait](/models/traits/has-member-of.md)
-
-## Creating
-
-> **Note**: If you need to create users with passwords, SSL or TLS **must** be enabled on your configured connection.
->
-> The password you enter for the user **must** also obey your LDAP servers password requirements,
-> otherwise you will receive a "Server is unwilling to perform" LDAP exception upon saving.
-
-```php
-// Construct a new User model instance.
-$user = $provider->make()->user();
-
-// Create the users distinguished name.
-// We're adding an OU onto the users base DN to have it be saved in the specified OU.
-$dn = $user->getDnBuilder()->addOu('Users'); // Built DN will be: "CN=John Doe,OU=Users,DC=acme,DC=org";
-
-// Set the users DN, account name.
-$user->setDn($dn);
-$user->setAccountName('jdoe');
-$user->setCommonName('John Doe');
-
-// Set the users password.
-// NOTE: This password must obey your AD servers password requirements
-// (including password history, length, special characters etc.)
-// otherwise saving will fail and you will receive an
-// "LDAP Server is unwilling to perform" message.
-$user->setPassword('correct-horse-battery-staple');
-
-// Get a new account control object for the user.
-$ac = $user->getUserAccountControlObject();
-
-// Mark the account as enabled (normal).
-$ac->accountIsNormal();
-
-// Set the account control on the user and save it.
-$user->setUserAccountControl($ac);
-
-// Save the user.
-$user->save();
-
-// All done! An enabled user will be created and is ready for use.
-```
-
-## Methods
-
-There's a ton of available methods for the User model. Below is a list for a quick reference.
-
-> **Note**: Don't see a method for an LDAP attribute? Create an issue and let us know!
-
-```php
-// Get the users display name.
-$user->getDisplayName();
-
-// Get the users first email address.
-$user->getEmail();
-
-// Get the users title.
-$user->getTitle();
-
-// Get the users department.
-$user->getDepartment();
-
-// Get the users first name.
-$user->getFirstName();
-
-// Get the users last name.
-$user->getLastName();
-
-// Get the users info.
-$user->getInfo();
-
-// Get the users initials.
-$user->getInitials();
-
-// Get the users country.
-$user->getCountry();
-
-// Get the users street address.
-$user->getStreetAddress();
-
-// Get the users postal code.
-$user->getPostalCode();
-
-// Get the users physical delivery office name.
-$user->getPhysicalDeliveryOfficeName();
-
-// Get the users phone number.
-$user->getTelephoneNumber();
-
-// Get the users locale.
-$user->getLocale();
-
-// Get the users company.
-$user->getCompany();
-
-// Get the users other email addresses.
-$user->getOtherMailbox();
-
-// Get the users home mailbox database location (stored as a distinguished name).
-$user->getHomeMdb();
-
-// Get the users email nickname.
-$user->getMailNickname();
-
-// Get the users principal name.
-$user->getUserPrincipalName();
-
-// Get the users proxy email addresses.
-$user->getProxyAddresses();
-
-// Get the users failed login attempts.
-$user->getBadPasswordCount();
-
-// Get the users last failed login attempt timestamp.
-$user->getBadPasswordTime();
-
-// Get the users last password change timestamp.
-$user->getPasswordLastSet();
-
-// Get the users last password change timestamp in unix time.
-$user->getPasswordLastSetTimestamp();
-
-// Get the users last password change timestamp in MySQL date format.
-$user->getPasswordLastSetDate();
-
-// Get the users lockout time.
-$user->getLockoutTime();
-
-// Get the users user account control integer.
-$user->getUserAccountControl();
-
-// Get the users roaming profile path.
-$user->getProfilePath();
-
-// Get the users legacy exchange distinguished name.
-$user->getLegacyExchangeDn();
-
-// Get the users account expiry timestamp.
-$user->getAccountExpiry();
-
-// Get the boolean that determines whether to show this user in the global address book.
-$user->getShowInAddressBook();
-
-// Get the users thumbnail photo.
-$user->getThumbnail();
-
-// Get the users thumbnail photo (base64 encoded for HTML tags).
-$user->getThumbnailEncoded();
-
-// Get the users jpeg photo.
-$user->getJpegPhoto();
-
-// Get the users jpeg photo (base64 encoded for HTML tags).
-$user->getJpegPhotoEncoded();
-
-// Get the users manager.
-$user->getManager();
-
-// Get the users employee ID.
-$user->getEmployeeId();
-
-// Get the users employee number.
-$user->getEmployeeNumber();
-
-// Get the users employee type
-$user->getEmployeeType();
-
-// Get the users room number.
-$user->getRoomNumber();
-
-// Get the users department number.
-$user->getDepartmentNumber();
-
-// Get the users personal title.
-$user->getPersonalTitle();
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/readme.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/readme.md
deleted file mode 100644
index 00eaab7c8..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/readme.md
+++ /dev/null
@@ -1,115 +0,0 @@
-# Introduction
-
-## What is Adldap2?
-
-Adldap2 is a PHP LDAP package that allows you to:
-
-1. Easily manage multiple LDAP connections at once
-2. Perform authentication
-3. Search your LDAP directory with a fluent and easy to use query builder
-4. Create / Update / Delete LDAP entities with ease
-5. And more
-
-## History of Adldap2
-
-Adldap2 was originally created as a fork of the original LDAP library [adLDAP](https://github.com/adldap/adLDAP) due to bugs, and it being completely abandoned.
-
-Adldap2 contains absolutely no similarities to the original repository, and was built to be as easily accessible as possible, with great documentation, and easily understandable syntax.
-
-Much of the API was constructed with Ruby's ActiveRecord and Laravel's Eloquent in mind, and to be an answer to the question:
-
-> _Why can't we use LDAP like we use a database?_
-
-## Why should you use Adldap2?
-
-Working with LDAP in PHP can be a messy and confusing endeavor, especially when using multiple connections, creating and managing entities, performing moves, resetting passwords, and performing ACL modifications to user accounts.
-
-Wrapper classes for LDAP are usually always created in PHP applications.
-
-Adldap2 allows you to easily manage the above problems without reinventing the wheel for every project.
-
-## Implementations
-
-- [Laravel](https://github.com/Adldap2/Adldap2-Laravel)
-
-## Quick Start
-
-Install the package via `composer`:
-
-```
-composer require adldap2/adldap2
-```
-
-Use Adldap2:
-
-```php
-// Construct new Adldap instance.
-$ad = new \Adldap\Adldap();
-
-// Create a configuration array.
-$config = [
- // An array of your LDAP hosts. You can use either
- // the host name or the IP address of your host.
- 'hosts' => ['ACME-DC01.corp.acme.org', '192.168.1.1'],
-
- // The base distinguished name of your domain to perform searches upon.
- 'base_dn' => 'dc=corp,dc=acme,dc=org',
-
- // The account to use for querying / modifying LDAP records. This
- // does not need to be an admin account. This can also
- // be a full distinguished name of the user account.
- 'username' => 'admin@corp.acme.org',
- 'password' => 'password',
-];
-
-// Add a connection provider to Adldap.
-$ad->addProvider($config);
-
-try {
- // If a successful connection is made to your server, the provider will be returned.
- $provider = $ad->connect();
-
- // Performing a query.
- $results = $provider->search()->where('cn', '=', 'John Doe')->get();
-
- // Finding a record.
- $user = $provider->search()->find('jdoe');
-
- // Creating a new LDAP entry. You can pass in attributes into the make methods.
- $user = $provider->make()->user([
- 'cn' => 'John Doe',
- 'title' => 'Accountant',
- 'description' => 'User Account',
- ]);
-
- // Setting a model's attribute.
- $user->cn = 'John Doe';
-
- // Saving the changes to your LDAP server.
- if ($user->save()) {
- // User was saved!
- }
-} catch (\Adldap\Auth\BindException $e) {
-
- // There was an issue binding / connecting to the server.
-
-}
-```
-
-## Versioning
-
-Adldap2 is versioned under the [Semantic Versioning](http://semver.org/) guidelines as much as possible.
-
-Releases will be numbered with the following format:
-
-`..`
-
-And constructed with the following guidelines:
-
-* Breaking backward compatibility bumps the major and resets the minor and patch.
-* New additions without breaking backward compatibility bumps the minor and resets the patch.
-* Bug fixes and misc changes bumps the patch.
-
-Minor versions are not maintained individually, and you're encouraged to upgrade through to the next minor version.
-
-Major versions are maintained individually through separate branches.
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/searching.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/searching.md
deleted file mode 100644
index 2837767e6..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/searching.md
+++ /dev/null
@@ -1,662 +0,0 @@
-# Searching
-
-## Introduction
-
-Using the Adldap2 query builder makes building LDAP queries feel effortless.
-
-It allows you to generate LDAP filters using a fluent and
-convenient interface, similar to Eloquent in Laravel.
-
-> **Note:** The Adldap2 query builder escapes all fields & values
-> given to its `where()` methods. There is no need to clean or
-> escape strings before passing them into the query builder.
-
-## Creating a new Query
-
-To create a new search query, call the `search()` method on your connection provider instance:
-
-```php
-$search = $provider->search();
-```
-
-Or you can chain all your methods if you'd prefer:
-
-```php
-$results = $provider->search()->where('cn', '=', 'John Doe')->get();
-```
-
-## Selects
-
-> **Note:** Fields are case in-sensitive. For example, you can
-> insert `CN`, `cn` or `cN`, they will return the same result.
-
-#### Selecting attributes
-
-Selecting only the LDAP attributes you need will increase the speed of your queries.
-
-```php
-// Passing in an array of attributes
-$search->select(['cn', 'samaccountname', 'telephone', 'mail']);
-
-// Passing in each attribute as an argument
-$search->select('cn', 'samaccountname', 'telephone', 'mail');
-```
-
-## Executing Searches
-
-#### Finding a specific record
-
-If you're trying to find a single record, but not sure what the record might be, use the `find()` method:
-
-```php
-$record = $search->find('John Doe');
-
-if ($record) {
- // Record was found!
-} else {
- // Hmm, looks like we couldn't find anything...
-}
-```
-
-> **Note**: Using the `find()` method will search for LDAP records using ANR
-> (ambiguous name resolution) and return the first result.
->
-> Since ActiveDirectory is the only LDAP distribution that supports ANR,
-> an equivalent query will be created for other LDAP distributions
-> that are not compatible.
->
-> For a more fine-tuned search, use the `findBy()` method below.
-
-##### Finding a record (or failing)
-
-If you'd like to try and find a single record and throw an exception when it hasn't been
-found, use the `findOrFail()` method:
-
-```php
-try {
-
- $record = $search->findOrFail('John Doe');
-
-} catch (Adldap\Models\ModelNotFoundException $e) {
- // Record wasn't found!
-}
-```
-
-#### Finding a record by a specific attribute
-
-If you're looking for a single record with a specific attribute, use the `findBy()` method:
-
-```php
-// We're looking for a record with the 'samaccountname' of 'jdoe'.
-$record = $search->findBy('samaccountname', 'jdoe');
-```
-
-##### Finding a record by a specific attribute (or failing)
-
-If you'd like to try and find a single record by a specific attribute and throw
-an exception when it cannot be found, use the `findByOrFail()` method:
-
-```php
-try {
-
- $record = $search->findByOrFail('samaccountname', 'jdoe');
-
-} catch (Adldap\Models\ModelNotFoundException $e) {
- // Record wasn't found!
-}
-```
-
-#### Finding a record by its distinguished name
-
-If you're looking for a single record with a specific DN, use the `findByDn()` method:
-
-```php
-$record = $search->findByDn('cn=John Doe,dc=corp,dc=org');
-```
-
-###### Finding a record by its distinguished name (or failing)
-
-If you'd like to try and find a single record by a specific DN and throw
-an exception when it hasn't been found, use the `findByDnOrFail()` method:
-
-```php
-try {
-
- $record = $search->findByDnOrFail('cn=John Doe,dc=corp,dc=org');
-
-} catch (Adldap\Models\ModelNotFoundException $e) {
- // Record wasn't found!
-}
-```
-
-#### Retrieving results
-
-To get the results from a search, simply call the `get()` method:
-
-```php
-$results = $search->select(['cn', 'samaccountname'])->get();
-```
-
-> **Note**: Executed searches via the `get()` method will return them inside an
-> `Illuminate\Support\Collection` instance (a glorified array), with allows
-> you to utilize [some extremely handy methods](https://laravel.com/docs/collections).
->
-> Executed searches via the `first()` method will return **a model instance only**.
-
-##### Retrieving the first record
-
-To retrieve the first record of a search, call the `first()` method:
-
-```php
-$record = $search->first();
-```
-
-> **Note**: If you are using `sortBy()`, calling `first()` will not take this into account. Sorts
-> are performed **after** retrieving query results. If you would like the first record of
-> a sorted result set, call `first()` on a `Collection` of returned models.
-
-###### Retrieving the first record (or failing)
-
-To retrieve the first record of a search or throw an exception when one isn't found, call the `firstOrFail()` method:
-
-```php
-try {
-
- $record = $search->firstOrFail();
-
-} catch (Adldap\Models\ModelNotFoundException $e) {
- // Record wasn't found!
-}
-```
-
-## Limit
-
-To limit the results records returned from your LDAP server and increase the
-speed of your queries, you can use the `limit()` method:
-
-```php
-// This will only return 5 records that contain the name of 'John':
-$records = $search->where('cn', 'contains', 'John')->limit(5)->get();
-```
-
-## Wheres
-
-To perform a where clause on the search object, use the `where()` function:
-
-```php
-$search->where('cn', '=', 'John Doe');
-```
-
-This query would look for a record with the common name of 'John Doe' and return the results.
-
-We can also perform a 'where equals' without including the operator:
-
-```php
-$search->whereEquals('cn', 'John Doe');
-```
-
-We can also supply an array of key - value pairs to quickly add multiple wheres:
-
-```php
-$wheres = [
- 'cn' => 'John Doe',
- 'samaccountname' => 'jdoe',
-];
-
-$search->where($wheres);
-```
-
-Or, if you require conditionals, you can quickly add multiple wheres with nested arrays:
-
-```php
-$search->where([
- ['cn', '=', 'John Doe'],
- ['manager', '!', 'Suzy Doe'],
-]);
-```
-
-#### Where Starts With
-
-We could also perform a search for all objects beginning with the common name of 'John' using the `starts_with` operator:
-
-```php
-$results = $provider->search()->where('cn', 'starts_with', 'John')->get();
-
-// Or use the method whereStartsWith($attribute, $value):
-
-$results = $provider->search()->whereStartsWith('cn', 'John')->get();
-```
-
-#### Where Ends With
-
-We can also search for all objects that end with the common name of `Doe` using the `ends_with` operator:
-
-```php
-$results = $provider->search()->where('cn', 'ends_with', 'Doe')->get();
-
-// Or use the method whereEndsWith($attribute, $value):
-
-$results = $provider->search()->whereEndsWith('cn', 'Doe')->get();
-```
-
-#### Where Between
-
-To search for records between two values, use the `whereBetween` method.
-
-For the example below, we'll retrieve all users who were created between two dates:
-
-```php
-$from = (new DateTime('October 1st 2016'))->format('YmdHis.0\Z');
-$to = (new DateTime('January 1st 2017'))->format('YmdHis.0\Z');
-
-$users = $provider->search()
- ->users()
- ->whereBetween('whencreated', [$from, $to])
- ->get();
-```
-
-#### Where Contains
-
-We can also search for all objects with a common name that contains `John Doe` using the `contains` operator:
-
-```php
-$results = $provider->search()->where('cn', 'contains', 'John Doe')->get();
-
-// Or use the method whereContains($attribute, $value):
-
-$results = $provider->search()->whereContains('cn', 'John Doe')->get();
-```
-
-##### Where Not Contains
-
-You can use a 'where not contains' to perform the inverse of a 'where contains':
-
-```php
-$results = $provider->search()->where('cn', 'not_contains', 'John Doe')->get();
-
-// Or use the method whereNotContains($attribute, $value):
-
-$results = $provider->search()->whereNotContains('cn', 'John Doe');
-```
-
-#### Where Has
-
-Or we can retrieve all objects that have a common name attribute using the wildcard operator (`*`):
-
-```php
-$results = $provider->search()->where('cn', '*')->get();
-
-// Or use the method whereHas($field):
-
-$results = $provider->search()->whereHas('cn')->get();
-```
-
-This type of filter syntax allows you to clearly see what your searching for.
-
-##### Where Not Has
-
-You can use a 'where not has' to perform the inverse of a 'where has':
-
-```php
-$results = $provider->search->where('cn', '!*')->get();
-
-// Or use the method whereNotHas($field):
-
-$results = $provider->search()->whereNotHas($field)->get();
-```
-
-## Or Wheres
-
-To perform an `or where` clause on the search object, use the `orWhere()` method. However,
-please be aware this function performs differently than it would on a database.
-
-For example:
-
-```php
-$results = $search
- ->where('cn', '=', 'John Doe')
- ->orWhere('cn', '=', 'Suzy Doe')
- ->get();
-```
-
-This query would return no results. Since we're already defining that the common name (`cn`) must equal `John Doe`, applying
-the `orWhere()` does not amount to 'Look for an object with the common name as "John Doe" OR "Suzy Doe"'. This query would
-actually amount to 'Look for an object with the common name that equals "John Doe" OR "Suzy Doe"
-
-To solve the above problem, we would use `orWhere()` for both fields. For example:
-
-```php
-$results = $search
- ->orWhere('cn', '=', 'John Doe')
- ->orWhere('cn', '=', 'Suzy Doe')
- ->get();
-```
-
-Now, we'll retrieve both John and Suzy's LDAP records, because the common name can equal either.
-
-> **Note**: You can also use all `where` methods as an or where, for example:
-> `orWhereHas()`, `orWhereContains()`, `orWhereStartsWith()`, `orWhereEndsWith()`
-
-## Dynamic Wheres
-
-To perform a dynamic where, simply suffix a `where` with the field you're looking for.
-
-This feature was directly ported from Laravel's Eloquent.
-
-Here's an example:
-
-```php
-// This query:
-$result = $search->where('cn', '=', 'John Doe')->first();
-
-// Can be converted to:
-$result = $search->whereCn('John Doe')->first();
-```
-
-You can perform this on **any** attribute:
-
-```php
-$result = $search->whereTelephonenumber('555-555-5555')->first();
-```
-
-You can also chain them:
-
-```php
-$result = $search
- ->whereTelephonenumber('555-555-5555')
- ->whereGivenname('John Doe')
- ->whereSn('Doe')
- ->first();
-```
-
-You can even perform multiple dynamic wheres by separating your fields by an `And`:
-
-```php
-// This would perform a search for a user with the
-// first name of 'John' and last name of 'Doe'.
-$result = $search->whereGivennameAndSn('John', 'Doe')->first();
-```
-
-## Nested Filters
-
-By default, the Adldap2 query builder automatically wraps your queries in `and` / `or` filters for you.
-However, if any further complexity is required, nested filters allow you
-to construct any query fluently and easily.
-
-#### andFilter
-
-The `andFilter` method accepts a closure which allows you to construct a query inside of an `and` LDAP filter:
-
-```php
-$query = $provider->search()->newQuery();
-
-// Creates the filter: (&(givenname=John)(sn=Doe))
-$results = $query->andFilter(function (Adldap\Query\Builder $q) {
-
- $q->where('givenname', '=', 'John')
- ->where('sn', '=', 'Doe');
-
-})->get();
-```
-
-The above query would return records that contain the first name `John` **and** the last name `Doe`.
-
-#### orFilter
-
-The `orFilter` method accepts a closure which allows you to construct a query inside of an `or` LDAP filter:
-
-```php
-$query = $provider->search()->newQuery();
-
-
-// Creates the filter: (|(givenname=John)(sn=Doe))
-$results = $query->orFilter(function (Adldap\Query\Builder $q) {
-
- $q->where('givenname', '=', 'John')
- ->where('sn', '=', 'Doe');
-
-})->get();
-```
-
-The above query would return records that contain the first name `John` **or** the last name `Doe`.
-
-#### notFilter
-
-The `notFilter` method accepts a closure which allows you to construct a query inside a `not` LDAP filter:
-
-```php
-$query = $provider->search()->newQuery();
-
-// Creates the filter: (!(givenname=John)(sn=Doe))
-$results = $query->notFilter(function (Adldap\Query\Builder $q) {
-
- $q->where('givenname', '=', 'John')
- ->where('sn', '=', 'Doe');
-
-})->get();
-```
-
-The above query would return records that **do not** contain the first name `John` **or** the last name `Doe`.
-
-#### Complex Nesting
-
-The above methods `andFilter` / `orFilter` can be chained together and nested
-as many times as you'd like for larger complex queries:
-
-```php
-$query = $provider->search()->newQuery();
-
-$query = $query->orFilter(function (Adldap\Query\Builder $q) {
- $q->where('givenname', '=', 'John')->where('sn', '=', 'Doe');
-})->andFilter(function (Adldap\Query\Builder $q) {
- $q->where('department', '=', 'Accounting')->where('title', '=', 'Manager');
-})->getUnescapedQuery();
-
-echo $query; // Returns '(&(|(givenname=John)(sn=Doe))(&(department=Accounting)(title=Manager)))'
-```
-
-## Raw Filters
-
-> **Note**: Raw filters are not escaped. **Do not** accept user input into the raw filter method.
-
-Sometimes you might just want to add a raw filter without using the query builder.
-You can do so by using the `rawFilter()` method:
-
-```php
-$filter = '(samaccountname=jdoe)';
-
-$results = $search->rawFilter($filter)->get();
-
-// Or use an array
-$filters = [
- '(samaccountname=jdoe)',
- '(surname=Doe)',
-];
-
-$results = $search->rawFilter($filters)->get();
-
-// Or use multiple arguments
-$results = $search->rawFilter($filters[0], $filters[1])->get();
-
-// Multiple raw filters will be automatically wrapped into an `and` filter:
-$query = $search->getUnescapedQuery();
-
-echo $query; // Returns (&(samaccountname=jdoe)(surname=Doe))
-```
-
-## Sorting
-
-Sorting is really useful when your displaying tabular LDAP results. You can
-easily perform sorts on any LDAP attribute by using the `sortBy()` method:
-
-```php
-$results = $search->whereHas('cn')->sortBy('cn', 'asc')->get();
-```
-
-You can also sort paginated results:
-
-```php
-$results = $search->whereHas('cn')->sortBy('cn', 'asc')->paginate(25);
-```
-
-> **Note**: Sorting occurs *after* results are returned. This is due
-> to PHP not having the functionality of sorting records on
-> the server side before they are returned.
-
-## Paginating
-
-Paginating your search results will allow you to return more results than
-your LDAP cap (usually 1000) and display your results in pages.
-
-> **Note**: Calling `paginate()` will retrieve **all** records from your LDAP server for the current query.
->
-> This **does not** operate the same way pagination occurs in a database. Pagination of
-> an LDAP query simply allows you to return a larger result set than your
-> LDAP servers configured maximum (usually 1000).
->
-> The pagination object is simply a collection that allows you to iterate
-> through all the resulting records easily and intuitively.
-
-To perform this, call the `paginate()` method instead of the `get()` method:
-
-```php
-$recordsPerPage = 50;
-
-$currentPage = $_GET['page'];
-
-// This would retrieve all records from your LDAP server inside a new Adldap\Objects\Paginator instance.
-$paginator = $search->paginate($recordsPerPage, $currentPage);
-
-// Returns total number of pages, int
-$paginator->getPages();
-
-// Returns current page number, int
-$paginator->getCurrentPage();
-
-// Returns the amount of entries allowed per page, int
-$paginator->getPerPage();
-
-// Returns all of the results in the entire paginated result
-$paginator->getResults();
-
-// Returns the total amount of retrieved entries, int
-$paginator->count();
-
-// Iterate over the results like normal
-foreach($paginator as $result)
-{
- echo $result->getCommonName();
-}
-```
-
-## Scopes
-
-Search scopes allow you to easily retrieve common models of a particular 'scope'.
-
-Each scope simply applies the required filters to the search object
-that (when executed) will only return the relevant models.
-
-Here is a list of all available scopes:
-
-```php
-// Retrieve all users (Adldap\Models\User).
-$results = $search->users()->get();
-
-// Retrieve all printers (Adldap\Models\Printer).
-$results = $search->printers()->get();
-
-// Retrieve all organizational units (Adldap\Models\OrganizationalUnit).
-$results = $search->ous()->get();
-
-// Retrieve all organizational units (Adldap\Models\OrganizationalUnit).
-$results = $search->organizations()->get();
-
-// Retrieve all groups (Adldap\Models\Group).
-$results = $search->groups()->get();
-
-// Retrieve all containers (Adldap\Models\Container).
-$results = $search->containers()->get();
-
-// Retrieve all contacts (Adldap\Models\Contact).
-$results = $search->contacts()->get();
-
-// Retrieve all computers (Adldap\Models\Computer).
-$results = $search->computers()->get();
-```
-
-## Base DN
-
-To set the base DN of your search you can use one of two methods:
-
-```php
-// Using the `in()` method:
-$results = $provider->search()->in('ou=Accounting,dc=acme,dc=org')->get();
-
-// Using the `setDn()` method:
-$results = $provider->search()->setDn('ou=Accounting,dc=acme,dc=org')->get();
-
-// You can also include `in()` with the scope
-$results = $provider->search()->organizations()->in('ou=Accounting,dc=acme,dc=org')->get()
-
-```
-
-Either option will return the same results. Use which ever method you prefer to be more readable.
-
-## Search Options
-
-#### Recursive
-
-By default, all searches performed are recursive.
-
-If you'd like to disable recursive search and perform a single level search, use the `listing()` method:
-
-```php
-$result = $provider->search()->listing()->get();
-```
-
-This would perform an `ldap_listing()` instead of an `ldap_search()`.
-
-#### Read
-
-If you'd like to perform a read instead of a listing or a recursive search, use the `read()` method:
-
-```php
-$result = $provider->search()->read()->where('objectClass', '*')->get();
-```
-
-This would perform an `ldap_read()` instead of an `ldap_listing()` or an `ldap_search()`.
-
-> **Note**: Performing a `read()` will always return *one* record in your result.
-
-#### Raw
-
-If you'd like to retrieve the raw LDAP results, use the `raw()` method:
-
-```php
-$rawResults = $provider->search()->raw()->where('cn', '=', 'John Doe')->get();
-
-var_dump($rawResults); // Returns an array
-```
-
-## Retrieving the ran query
-
-If you'd like to retrieve the current query to save or run it at another
-time, use the `getQuery()` method on the query builder.
-
-This will return the escaped filter.
-
-```php
-$query = $provider->search()->where('cn', '=', 'John Doe')->getQuery();
-
-echo $query; // Returns '(cn=\4a\6f\68\6e\20\44\6f\65)'
-```
-
-To retrieve the unescaped filter, call the `getUnescapedQuery()` method:
-
-```php
-$query = $provider->search()->where('cn', '=', 'John Doe')->getUnescapedQuery();
-
-echo $query; // Returns '(cn=John Doe)'
-```
-
-Now that you know how to search your directory, lets move onto [creating / modifying LDAP records](models/model.md).
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/setup.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/setup.md
deleted file mode 100644
index 312165c1c..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/setup.md
+++ /dev/null
@@ -1,552 +0,0 @@
-# Setup
-
-## Configuration
-
-To configure your LDAP connections, you can use two methods:
-
-1. Using an array
-2. Using a `Adldap\Configuration\DomainConfiguration` object
-
-Either or will produce the same results. Use whichever you feel most comfortable with.
-
-### Using an array
-
-```php
-$config = [
- 'hosts' => [
- 'DC-01.corp.acme.org',
- ],
- '...'
-];
-```
-
-### Using a `DomainConfiguration` object
-
-```php
-// Setting options via first argument:
-$config = new Adldap\Configuration\DomainConfiguration([
- 'hosts' => [
- 'DC-01.corp.acme.org',
- ],
-]);
-
-// Setting via the `set()` method:
-$config->set('hosts', [
- 'DC-01.corp.acme.org',
-]);
-```
-
-### Options
-
-#### Array Example With All Options
-
-```php
-// Create the configuration array.
-$config = [
- // Mandatory Configuration Options
- 'hosts' => ['corp-dc1.corp.acme.org', 'corp-dc2.corp.acme.org'],
- 'base_dn' => 'dc=corp,dc=acme,dc=org',
- 'username' => 'admin',
- 'password' => 'password',
-
- // Optional Configuration Options
- 'schema' => Adldap\Schemas\ActiveDirectory::class,
- 'account_prefix' => 'ACME-',
- 'account_suffix' => '@acme.org',
- 'port' => 389,
- 'follow_referrals' => false,
- 'use_ssl' => false,
- 'use_tls' => false,
- 'version' => 3,
- 'timeout' => 5,
-
- // Custom LDAP Options
- 'custom_options' => [
- // See: http://php.net/ldap_set_option
- LDAP_OPT_X_TLS_REQUIRE_CERT => LDAP_OPT_X_TLS_HARD
- ]
-];
-```
-
-#### Required Options
-
-##### Hosts
-
-The hosts option is an array of IP addresses or hostnames located
-on your network that serve Active Directory.
-
-You insert as many servers or as little as you'd like depending on your forest (with the minimum of one of course).
-
-> **Note:** Do not append your port to your IP addresses or hostnames. Use the `port` configuration option instead.
-
-##### Base Distinguished Name
-
-The base distinguished name is the base distinguished name you'd like to perform operations on.
-
-An example base DN would be `DC=corp,DC=acme,DC=org`.
-
-If one is not defined, you will not retrieve any search results.
-
-> **Note**: Your base DN is **case insensitive**. You do not need to worry about incorrect casing.
-
-##### Username & Password
-
-To connect to your LDAP server, a username and password is required to be able to query and run operations on your server(s).
-
-You can use any account that has these permissions.
-
-> **Note**: To run administration level operations, such as resetting passwords,
-> this account **must** have permissions to do so on your directory.
-
-#### Optional Options
-
-##### Schema
-
-The schema option allows you to configure which directory you're connecting to.
-
-This is a somewhat optional, however this **must** be changed if you're connecting
-to an alternate LDAP variant such as OpenLDAP or FreeIPA.
-
-Below are available schemas:
-
-- `Adldap\Schemas\ActiveDirectory`
-- `Adldap\Schemas\OpenLDAP`
-- `Adldap\Schemas\FreeIPA`
-
-By default, this option is set to the `Adldap\Schemas\ActiveDirectory` schema.
-
-##### Account Prefix
-
-The account prefix option is a string to *prepend* to all usernames that go through the `Guard::attempt()` method.
-
-This option is just for convenience.
-
-It is usually not needed (if utilizing the account suffix), however the functionality is
-in place if you would like to only allow certain users with the specified prefix
-to login, or add a domain so your users do not have to specify one.
-
-##### Account Suffix
-
-The account suffix option is a string to *append* to all usernames that go
-through the `Adldap\Auth\Guard::attempt()` method.
-
-This option is just for convenience.
-
-An example use case for this would be inserting your LDAP users `userPrincipalName` suffix so you don't need to append it manually.
-
-For example, with a `account_suffix` in your configuration set to `@corp.acme.org`:
-
-```php
-$username = 'jdoe';
-$password = 'password';
-
-// Here, an `ldap_bind()` will be called with a username of 'jdoe@corp.acme.org`
-$provider->auth()->attempt($username, $password);
-```
-
-##### Port
-
-The port option is used for authenticating and binding to your LDAP server.
-
-The default ports are already used for non SSL and SSL connections (389 and 636).
-
-Only insert a port if your LDAP server uses a unique port.
-
-##### Follow Referrals
-
-The follow referrals option is a boolean to tell active directory to follow a referral to another server on your network if the server queried knows the information your asking for exists, but does not yet contain a copy of it locally.
-
-This option is defaulted to false.
-
-Disable this option if you're experiencing search / connectivity issues.
-
-For more information, visit: https://technet.microsoft.com/en-us/library/cc978014.aspx
-
-##### SSL & TLS
-
-These Boolean options enable an SSL or TLS connection to your LDAP server.
-
-Only **one** can be set to `true`. You must chose either or.
-
-> **Note**: You **must** enable SSL or TLS to reset passwords in ActiveDirectory.
-
-These options are definitely recommended if you have the ability to connect to your server securely.
-
-> **Note**: TLS is recommended over SSL, as SSL is now labelled as a depreciated mechanism for securely running LDAP operations.
-
-##### Version
-
-The LDAP version to use for your connection.
-
-Must be an integer and can either be `2` or `3`.
-
-##### Timeout
-
-The timeout option allows you to configure the amount of seconds to wait until
-your application receives a response from your LDAP server.
-
-The default is 5 seconds.
-
-##### Custom Options
-
-Arbitrary options can be set for the connection to fine-tune TLS and connection behavior.
-
-Please note that `LDAP_OPT_PROTOCOL_VERSION`, `LDAP_OPT_NETWORK_TIMEOUT` and `LDAP_OPT_REFERRALS` will be ignored if set.
-
-These are set above with the `version`, `timeout` and `follow_referrals` keys respectively.
-
-Valid options are listed in the [PHP documentation for ldap_set_option](http://php.net/ldap_set_option).
-
-## Getting Started
-
-Each LDAP connection you have will be contained inside the `Adldap` instance as its own **connection provider**.
-
-There are a couple of ways you can easily add each of your LDAP connections. Let's walk through them:
-
-**Using a configuration array:**
-```php
-$config = ['...'];
-
-$ad = new Adldap\Adldap();
-
-$ad->addProvider($config);
-
-// You can also specify the name of the
-// connection as the second argument:
-$ad->addProvider($config, 'connection-one');
-```
-
-**Using a DomainConfiguration object:**
-```php
-$ad = new Adldap\Adldap();
-
-$config = new Adldap\Configuration\DomainConfiguration(['...']);
-
-$ad->addProvider($config, 'connection-one');
-```
-
-**Using the constructor:**
-
-> **Note**: When inserting your configuration into a new `Adldap` instance, you
-> need to set a key for each connection. **This will be its connection name**.
-
-```php
-$connections = [
- 'connection1' => [
- 'hosts' => ['...'],
- ],
- 'connection2' => [
- 'hosts' => ['...'],
- ],
-];
-
-$ad = new Adldap\Adldap($connections);
-```
-
-## Connecting
-
-The easiest way to get connected is to call the `connect($name)` method on your `Adldap` instance.
-
-Its first argument accepts the name of your configured connection.
-
-This method will return you a connected **connection provider** when
-successful, and throw an exception when unsuccessful:
-
-```php
-$ad = new Adldap\Adldap();
-
-$config = ['...'];
-
-$connectionName = 'my-connection';
-
-$ad->addProvider($config, $connectionName);
-
-try {
- $provider = $ad->connect($connectionName);
-
- // Great, we're connected!
-} catch (Adldap\Auth\BindException $e) {
- // Failed to connect.
-}
-```
-
-### Using an alternate username / password
-
-If you'd like to connect to your configured connection using a different username and password than your configuration, then simply provide them in the second and third arguments:
-
-```php
-$username = 'server-admin';
-$password = 'my-super-secret-password';
-
-$provider = $ad->connect($connectionName, $username, $password);
-```
-
-### Dynamically Connecting
-
-If you're like me and like chainable (fluent) API's in PHP, then dynamically connecting is a nice option to have.
-
-To dynamically connect, simply call any connection provider method on your `Adldap` instance.
-
-> **Note**: Your default connection will be used when dynamically connecting.
-> More on this below.
-
-Here's an example:
-
-```php
-$ad = new Adldap\Adldap();
-
-$ad->addProvider($config = ['...']);
-
-try {
- $users = $ad->search()->users()->get();
-} catch (Adldap\Auth\BindException $e) {
- // Failed to connect.
-}
-```
-
-### Anonymously Binding
-
-If you'd like to anonymously bind, set your `username` and `password` configuration to `null`:
-
-```php
-$ad = new Adldap\Adldap();
-
-$config = [
- 'username' => null,
- 'password' => null,
-];
-
-$ad->addProvider($config);
-
-try {
- $provider = $ad->connect();
-
- // ...
-} catch (BindException $e) {
- // Failed.
-}
-```
-
-Or, manually bind your provider and don't pass in a `username` or `password` parameter:
-
-```php
-$config = [
- 'hosts' => ['...'],
-];
-
-$ad->addProvider($config);
-
-$provider = $ad->getDefaultProvider();
-
-try {
- $provider->auth()->bind();
-
- // Successfully bound.
-} catch (BindException $e) {
- // Failed.
-}
-```
-
-### Setting a Default Connection
-
-Setting a default LDAP connection is used for dynamically connecting.
-
-To set your default connection, call the `setDefaultProvider($name)` method:
-
-```php
-$ad->setDefaultProvider('my-connection');
-
-$computers = $ad->search()->computers()->get();
-```
-
-## Authenticating
-
-If you're looking to authenticate (bind) users using your LDAP connection, call
-the `auth()->attempt()` method on your provider instance:
-
-```php
-$username = 'jdoe';
-$password = 'Password@1';
-
-try {
- if ($provider->auth()->attempt($username, $password)) {
- // Passed.
- } else {
- // Failed.
- }
-} catch (Adldap\Auth\UsernameRequiredException $e) {
- // The user didn't supply a username.
-} catch (Adldap\Auth\PasswordRequiredException $e) {
- // The user didn't supply a password.
-}
-```
-
-If you'd like all LDAP operations during the same request to be ran under the
-authenticated user, pass in `true` into the last paramter:
-
-```php
-if ($provider->auth()->attempt($username, $password, $bindAsUser = true)) {
- // Passed.
-} else {
- // Failed.
-}
-```
-
----
-
-Now that you've learned the basics of configuration and
-getting yourself connected, continue on to learn
-[how to search your LDAP directory](searching.md).
-
-## Using Other LDAP Servers (OpenLDAP / FreeIPA / etc.)
-
-Alternate LDAP server variants such as OpenLDAP or FreeIPA contain
-some different attribute names than ActiveDirectory.
-
-The Adldap2 schema offers an attribute map for each available LDAP attribute, and
-is completely configurable and customizable.
-
-If you're using an alternate LDAP server variant such as OpenLDAP or FreeIPA, you **must** change the default schema inside your configuration array. If you do not, you won't receive the correct model instances for results, and you won't be
-able to utilize some standard methods available on these models.
-
-By default, Adldap2 is configured to be used with **Microsoft ActiveDirectory**.
-
-When creating your configuration array, set your schema using the `schema` key:
-
-
-**Using configuration array:**
-```php
-$ad = new Adldap\Adldap();
-
-$config = [
- '...',
- 'schema' => Adldap\Schemas\OpenLDAP::class
-];
-
-$ad->addProvider($config);
-```
-
-**Using configuration object:**
-```php
-$ad = new Adldap\Adldap();
-
-$config = new Adldap\Configuration\DomainConfiguration();
-
-$config->set('schema', Adldap\Schemas\OpenLDAP::class);
-
-$ad->addProvider($config);
-```
-
-Once you've set the schema of your connection provider, you can use the same API interacting with different LDAP servers.
-
-Continue onto the [searching](searching.md) documentation to learn how to begin querying your LDAP server(s).
-
-## Using G-Suite Secure LDAP Service
-
-G-Suite LDAP service only uses client certificates and no username + password, make sure yo match base_dn with your domian.
-
-```php
-$ad = new \Adldap\Adldap();
-
-// Create a configuration array.
-$config = [
- 'hosts' => ['ldap.google.com'],
- 'base_dn' => 'dc=your-domain,dc=com',
- 'use_tls' => true,
- 'version' => 3,
- 'schema' => Adldap\Schemas\GSuite::class,
- 'custom_options' => [
- LDAP_OPT_X_TLS_CERTFILE => 'Google_2023_02_05_35779.crt',
- LDAP_OPT_X_TLS_KEYFILE => 'Google_2023_02_05_35779.key',
- ]
-];
-
-$ad->addProvider($config);
-
-try {
- $provider = $ad->connect();
-
- $results = $provider->search()->ous()->get();
-
- echo 'OUs:'."\r\n";
- echo '==============='."\r\n";
- foreach($results as $ou) {
- echo $ou->getDn()."\r\n";
- }
-
- echo "\r\n";
-
- $results = $provider->search()->users()->get();
-
- echo 'Users:'."\r\n";
- echo '==============='."\r\n";
- foreach($results as $user) {
-
- echo $user->getAccountName()."\r\n";
- }
-
- echo "\r\n";
-
- $results = $provider->search()->groups()->get();
-
- echo 'Groups:'."\r\n";
- echo '==============='."\r\n";
- foreach($results as $group) {
- echo $group->getCommonName().' | '.$group->getDisplayName()."\r\n";
- }
-
-} catch (\Adldap\Auth\BindException $e) {
-
- echo 'Error: '.$e->getMessage()."\r\n";
-}
-```
-
-## Raw Operations
-
-### Introduction
-
-If you want to connect to your LDAP server without utilizing Adldap's models (old fashion way), and want to get back the data in a raw format you can easily do so.
-
-If you call `getConnection()` on your connected provider instance, you can perform all LDAP functions on a container class that encapsulates all of PHP's LDAP methods.
-
-You can view all methods avaialble by browsing the LDAP class [here](https://github.com/Adldap2/Adldap2/blob/master/src/Connections/Ldap.php).
-
-Now for some examples:
-
-### Examples
-
-```php
-$ad = new Adldap\Adldap();
-
-$config = ['...'];
-
-$ad->addProvider($config);
-
-$provider = $ad->connect();
-
-$rawConnection = $provider->getConnection();
-
-// Performing a raw search.
-$result = $rawConnection->search($basedn = 'dc=corp,dc=acme,dc=org', $filter = "cn=johndoe", $selectedAttributes = ['cn', 'department']);
-
-$dn = "cn=John Smith,ou=Wizards,dc=example,dc=com";
-
-// Adding a new LDAP record.
-$result = $rawConnection->add($dn, $entry);
-
-// Batch modifying an LDAP record.
-$modifs = [
- [
- "attrib" => "telephoneNumber",
- "modtype" => LDAP_MODIFY_BATCH_ADD,
- "values" => ["+1 555 555 1717"],
- ],
-];
-
-$result = $rawConnection->modifyBatch($dn, $modifs);
-
-// Deleting an LDAP record.
-$result = $rawConnection->delete($dn);
-
-// .. etc
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/docs/troubleshooting.md b/data/web/inc/lib/vendor/adldap2/adldap2/docs/troubleshooting.md
deleted file mode 100644
index c1e9f2a84..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/docs/troubleshooting.md
+++ /dev/null
@@ -1,122 +0,0 @@
-# Troubleshooting
-
-#### Creating and Setting a Users Password
-
-To set a users password when you've created a new one, you need to enable their account, **then** set their password.
-
-For example:
-
-```php
-// Construct a new user instance.
-$user = $provider->make()->user();
-
-// Set the user profile details.
-$user->setAccountName('jdoe');
-$user->setFirstName('John');
-$user->setLastName('Doe');
-$user->setCompany('ACME');
-$user->setEmail('jdoe@acme.com');
-
-// Save the new user.
-if ($user->save()) {
- // Enable the new user (using user account control).
- $user->setUserAccountControl(512);
-
- // Set new user password
- $user->setPassword('Password123');
-
- // Save the user.
- if($user->save()) {
- // The password was saved successfully.
- }
-}
-```
-
-#### Determining and Troubleshooting a Binding Failure
-
-> **Note**: The below guide is using ActiveDirectory. Your mileage will vary using other LDAP distributions.
-
-To determine the reason why a bind attempt failed, you can use the event dispatcher to listen for
-the `Failed` event, and retrieve the errors that were returned from your LDAP server:
-
-```php
-use Adldap\Adldap;
-use Adldap\Auth\Events\Failed;
-
-$d = Adldap::getEventDispatcher();
-
-$d->listen(Failed::class, function (Failed $event) {
- $conn = $event->connection;
-
- echo $conn->getLastError(); // 'Invalid credentials'
- echo $conn->getDiagnosticMessage(); // '80090308: LdapErr: DSID-0C09042A, comment: AcceptSecurityContext error, data 532, v3839'
-
- if ($error = $conn->getDetailedError()) {
- $error->getErrorCode(); // 49
- $error->getErrorMessage(); // 'Invalid credentials'
- $error->getDiagnosticMessage(); // '80090308: LdapErr: DSID-0C09042A, comment: AcceptSecurityContext error, data 532, v3839'
- }
-});
-```
-
-The above diagnostic message can be parsed down further if needed. The error code after the 'data' string
-in the above message indicates several things about the bind failure. Here is a list:
-
-- 525 - user not found
-- 52e - invalid credentials
-- 530 - not permitted to logon at this time
-- 531 - not permitted to logon at this workstation
-- 532 - password expired
-- 533 - account disabled
-- 701 - account expired
-- 773 - user must reset password
-- 775 - user account locked
-
-From the example above, you can see that the authenticating account has their password expired, due to "532" error code.
-
-#### Retrieving All Records Inside a Group
-
-To retrieve all records inside a particular group (including nested groups), use the `rawFilter()` method:
-
-```php
-// The `memberof:1.2.840.113556.1.4.1941:` string indicates
-// that we want all nested group records as well.
-$filter = '(memberof:1.2.840.113556.1.4.1941:=CN=MyGroup,DC=example,DC=com)';
-
-$users = $provider->search()->rawFilter($filter)->get();
-```
-
-#### I'm connected but not getting any search results!
-
-The first thing you need to ensure is your `base_dn` in your configuration.
-
-Your `base_dn` needs to identical to the base DN on your domain. Even one mistyped character will result in no search results.
-
-If you also include an `ou` in your base DN (ex. `ou=Accounting,dc=corp,dc=acme,dc=org`), you will only receive results inside the `Accounting` OU.
-
-Once you're connected to your LDAP server, retrieve the Root DSE record.
-
-Here's a full example:
-
-```php
-$providers = [
- 'default' => [
- 'base_dn' => '',
- '...',
- ]
-];
-
-$ad = new Adldap\Adldap($providers);
-
-try {
- $provider = $ad->connect();
-
- $root = $provider->search()->getRootDse();
-
- // ex. Returns 'dc=corp,dc=acme,dc=org'
- die($root->getRootDomainNamingContext());
-
-} catch (Adldap\Auth\BindException $e) {
- //
-}
-```
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/license.md b/data/web/inc/lib/vendor/adldap2/adldap2/license.md
deleted file mode 100644
index c25dc6032..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/license.md
+++ /dev/null
@@ -1,8 +0,0 @@
-The MIT License (MIT)
-Copyright © Steve Bauman
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/phpunit.xml b/data/web/inc/lib/vendor/adldap2/adldap2/phpunit.xml
deleted file mode 100644
index 4f327fae0..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/phpunit.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- ./tests/
-
-
-
-
- ./src
-
-
-
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/readme.md b/data/web/inc/lib/vendor/adldap2/adldap2/readme.md
deleted file mode 100644
index 1311332c7..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/readme.md
+++ /dev/null
@@ -1,47 +0,0 @@
-
-:wave: Hey there! Looking for something even easier to use for LDAP integration in your PHP applications?
-
-
-
-
-
-
- LdapRecord is the successor to Adldap2 - and comes with a ton of new features.
- Adldap2 will continue to be supported with bug fixes, but will not receive new features.
-
-
-
-
- Read Why
-
-
-
-
-
-Adldap2
-
-
-
-
-
-
-
-
-
-
- Adldap2 is a PHP package that provides LDAP authentication and directory management tools using the Active Record pattern .
-
-
-
-
-- **Up and running in minutes.** Effortlessly connect to your LDAP servers and start running queries & operations in a matter of minutes.
-
-- **Fluent query builder.** Building LDAP queries has never been so easy. Find the records you're looking for in a couple lines or less with a fluent interface.
-
-- **Supercharged Active Record.** Create and modify LDAP records with ease. All LDAP records are individual models. Simply modify the attributes on the model and save it to persist the changes to your LDAP server.
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Adldap.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Adldap.php
deleted file mode 100644
index 5e606978f..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Adldap.php
+++ /dev/null
@@ -1,194 +0,0 @@
- $config) {
- $this->addProvider($config, $name);
- }
-
- if ($default = key($providers)) {
- $this->setDefaultProvider($default);
- }
-
- $this->initEventLogger();
- }
-
- /**
- * {@inheritdoc}
- */
- public function addProvider($config, $name = 'default', ConnectionInterface $connection = null)
- {
- if ($this->isValidConfig($config)) {
- $config = new Provider($config, $connection ?? new Ldap($name));
- }
-
- if ($config instanceof ProviderInterface) {
- $this->providers[$name] = $config;
-
- return $this;
- }
-
- throw new InvalidArgumentException(
- "You must provide a configuration array or an instance of Adldap\Connections\ProviderInterface."
- );
- }
-
- /**
- * Determines if the given config is valid.
- *
- * @param mixed $config
- *
- * @return bool
- */
- protected function isValidConfig($config)
- {
- return is_array($config) || $config instanceof DomainConfiguration;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getProviders()
- {
- return $this->providers;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getProvider($name)
- {
- if (array_key_exists($name, $this->providers)) {
- return $this->providers[$name];
- }
-
- throw new AdldapException("The connection provider '$name' does not exist.");
- }
-
- /**
- * {@inheritdoc}
- */
- public function setDefaultProvider($name = 'default')
- {
- if ($this->getProvider($name) instanceof ProviderInterface) {
- $this->default = $name;
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getDefaultProvider()
- {
- return $this->getProvider($this->default);
- }
-
- /**
- * {@inheritdoc}
- */
- public function removeProvider($name)
- {
- unset($this->providers[$name]);
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function connect($name = null, $username = null, $password = null)
- {
- $provider = $name ? $this->getProvider($name) : $this->getDefaultProvider();
-
- return $provider->connect($username, $password);
- }
-
- /**
- * {@inheritdoc}
- */
- public function __call($method, $parameters)
- {
- $provider = $this->getDefaultProvider();
-
- if (! $provider->getConnection()->isBound()) {
- $provider->connect();
- }
-
- return call_user_func_array([$provider, $method], $parameters);
- }
-
- /**
- * Initializes the event logger.
- *
- * @return void
- */
- public function initEventLogger()
- {
- $dispatcher = static::getEventDispatcher();
-
- $logger = $this->newEventLogger();
-
- // We will go through each of our event wildcards and register their listener.
- foreach ($this->listen as $event) {
- $dispatcher->listen($event, function ($eventName, $events) use ($logger) {
- foreach ($events as $event) {
- $logger->log($event);
- }
- });
- }
- }
-
- /**
- * Returns a new event logger instance.
- *
- * @return EventLogger
- */
- protected function newEventLogger()
- {
- return new EventLogger(static::getLogger());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/AdldapException.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/AdldapException.php
deleted file mode 100644
index 0939cac08..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/AdldapException.php
+++ /dev/null
@@ -1,8 +0,0 @@
-detailedError = $error;
-
- return $this;
- }
-
- /**
- * Returns the detailed error.
- *
- * @return DetailedError|null
- */
- public function getDetailedError()
- {
- return $this->detailedError;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/Events/Attempting.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/Events/Attempting.php
deleted file mode 100644
index 06eb839ed..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/Events/Attempting.php
+++ /dev/null
@@ -1,8 +0,0 @@
-connection = $connection;
- $this->username = $username;
- $this->password = $password;
- }
-
- /**
- * Returns the events connection.
- *
- * @return ConnectionInterface
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * Returns the authentication events username.
- *
- * @return string
- */
- public function getUsername()
- {
- return $this->username;
- }
-
- /**
- * Returns the authentication events password.
- *
- * @return string
- */
- public function getPassword()
- {
- return $this->password;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/Events/Failed.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/Events/Failed.php
deleted file mode 100644
index e96746efc..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/Events/Failed.php
+++ /dev/null
@@ -1,8 +0,0 @@
-connection = $connection;
- $this->configuration = $configuration;
- }
-
- /**
- * {@inheritdoc}
- */
- public function attempt($username, $password, $bindAsUser = false)
- {
- $this->validateCredentials($username, $password);
-
- $this->fireAttemptingEvent($username, $password);
-
- try {
- $this->bind(
- $this->applyPrefixAndSuffix($username),
- $password
- );
-
- $result = true;
-
- $this->firePassedEvent($username, $password);
- } catch (BindException $e) {
- // We'll catch the BindException here to allow
- // developers to use a simple if / else
- // using the attempt method.
- $result = false;
- }
-
- // If we're not allowed to bind as the user,
- // we'll rebind as administrator.
- if ($bindAsUser === false) {
- // We won't catch any BindException here so we can
- // catch rebind failures. However this shouldn't
- // occur if our credentials are correct
- // in the first place.
- $this->bindAsAdministrator();
- }
-
- return $result;
- }
-
- /**
- * {@inheritdoc}
- */
- public function bind($username = null, $password = null)
- {
- $this->fireBindingEvent($username, $password);
-
- try {
- if (@$this->connection->bind($username, $password) === true) {
- $this->fireBoundEvent($username, $password);
- } else {
- throw new Exception($this->connection->getLastError(), $this->connection->errNo());
- }
- } catch (Throwable $e) {
- $this->fireFailedEvent($username, $password);
-
- throw (new BindException($e->getMessage(), $e->getCode(), $e))
- ->setDetailedError($this->connection->getDetailedError());
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function bindAsAdministrator()
- {
- $this->bind(
- $this->configuration->get('username'),
- $this->configuration->get('password')
- );
- }
-
- /**
- * Get the event dispatcher instance.
- *
- * @return DispatcherInterface
- */
- public function getDispatcher()
- {
- return $this->events;
- }
-
- /**
- * Sets the event dispatcher instance.
- *
- * @param DispatcherInterface $dispatcher
- *
- * @return void
- */
- public function setDispatcher(DispatcherInterface $dispatcher)
- {
- $this->events = $dispatcher;
- }
-
- /**
- * Applies the prefix and suffix to the given username.
- *
- * @param string $username
- *
- * @throws \Adldap\Configuration\ConfigurationException If account_suffix or account_prefix do not
- * exist in the providers domain configuration
- *
- * @return string
- */
- protected function applyPrefixAndSuffix($username)
- {
- $prefix = $this->configuration->get('account_prefix');
- $suffix = $this->configuration->get('account_suffix');
-
- return $prefix.$username.$suffix;
- }
-
- /**
- * Validates the specified username and password from being empty.
- *
- * @param string $username
- * @param string $password
- *
- * @throws PasswordRequiredException When the given password is empty.
- * @throws UsernameRequiredException When the given username is empty.
- */
- protected function validateCredentials($username, $password)
- {
- if (empty($username)) {
- // Check for an empty username.
- throw new UsernameRequiredException('A username must be specified.');
- }
-
- if (empty($password)) {
- // Check for an empty password.
- throw new PasswordRequiredException('A password must be specified.');
- }
- }
-
- /**
- * Fire the attempting event.
- *
- * @param string $username
- * @param string $password
- *
- * @return void
- */
- protected function fireAttemptingEvent($username, $password)
- {
- if (isset($this->events)) {
- $this->events->fire(new Attempting($this->connection, $username, $password));
- }
- }
-
- /**
- * Fire the passed event.
- *
- * @param string $username
- * @param string $password
- *
- * @return void
- */
- protected function firePassedEvent($username, $password)
- {
- if (isset($this->events)) {
- $this->events->fire(new Passed($this->connection, $username, $password));
- }
- }
-
- /**
- * Fire the failed event.
- *
- * @param string $username
- * @param string $password
- *
- * @return void
- */
- protected function fireFailedEvent($username, $password)
- {
- if (isset($this->events)) {
- $this->events->fire(new Failed($this->connection, $username, $password));
- }
- }
-
- /**
- * Fire the binding event.
- *
- * @param string $username
- * @param string $password
- *
- * @return void
- */
- protected function fireBindingEvent($username, $password)
- {
- if (isset($this->events)) {
- $this->events->fire(new Binding($this->connection, $username, $password));
- }
- }
-
- /**
- * Fire the bound event.
- *
- * @param string $username
- * @param string $password
- *
- * @return void
- */
- protected function fireBoundEvent($username, $password)
- {
- if (isset($this->events)) {
- $this->events->fire(new Bound($this->connection, $username, $password));
- }
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/GuardInterface.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/GuardInterface.php
deleted file mode 100644
index e10da3740..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Auth/GuardInterface.php
+++ /dev/null
@@ -1,55 +0,0 @@
- [],
-
- // The global LDAP operation timeout limit in seconds.
- 'timeout' => 5,
-
- // The LDAP version to utilize.
- 'version' => 3,
-
- // The port to use for connecting to your hosts.
- 'port' => ConnectionInterface::PORT,
-
- // The schema to use for your LDAP connection.
- 'schema' => ActiveDirectory::class,
-
- // The base distinguished name of your domain.
- 'base_dn' => '',
-
- // The username to connect to your hosts with.
- 'username' => '',
-
- // The password that is utilized with the above user.
- 'password' => '',
-
- // The account prefix to use when authenticating users.
- 'account_prefix' => null,
-
- // The account suffix to use when authenticating users.
- 'account_suffix' => null,
-
- // Whether or not to use SSL when connecting to your hosts.
- 'use_ssl' => false,
-
- // Whether or not to use TLS when connecting to your hosts.
- 'use_tls' => false,
-
- // Whether or not follow referrals is enabled when performing LDAP operations.
- 'follow_referrals' => false,
-
- // Custom LDAP options that you'd like to utilize.
- 'custom_options' => [],
- ];
-
- /**
- * Constructor.
- *
- * @param array $options
- *
- * @throws ConfigurationException When an option value given is an invalid type.
- */
- public function __construct(array $options = [])
- {
- foreach ($options as $key => $value) {
- $this->set($key, $value);
- }
- }
-
- /**
- * Sets a configuration option.
- *
- * Throws an exception if the specified option does
- * not exist, or if it's an invalid type.
- *
- * @param string $key
- * @param mixed $value
- *
- * @throws ConfigurationException When an option value given is an invalid type.
- */
- public function set($key, $value)
- {
- if ($this->validate($key, $value)) {
- $this->options[$key] = $value;
- }
- }
-
- /**
- * Returns the value for the specified configuration options.
- *
- * Throws an exception if the specified option does not exist.
- *
- * @param string $key
- *
- * @throws ConfigurationException When the option specified does not exist.
- *
- * @return mixed
- */
- public function get($key)
- {
- if ($this->has($key)) {
- return $this->options[$key];
- }
-
- throw new ConfigurationException("Option {$key} does not exist.");
- }
-
- /**
- * Checks if a configuration option exists.
- *
- * @param string $key
- *
- * @return bool
- */
- public function has($key)
- {
- return array_key_exists($key, $this->options);
- }
-
- /**
- * Validates the new configuration option against its
- * default value to ensure it's the correct type.
- *
- * If an invalid type is given, an exception is thrown.
- *
- * @param string $key
- * @param mixed $value
- *
- * @throws ConfigurationException When an option value given is an invalid type.
- *
- * @return bool
- */
- protected function validate($key, $value)
- {
- $default = $this->get($key);
-
- if (is_array($default)) {
- $validator = new Validators\ArrayValidator($key, $value);
- } elseif (is_int($default)) {
- $validator = new Validators\IntegerValidator($key, $value);
- } elseif (is_bool($default)) {
- $validator = new Validators\BooleanValidator($key, $value);
- } elseif (class_exists($default)) {
- $validator = new Validators\ClassValidator($key, $value);
- } else {
- $validator = new Validators\StringOrNullValidator($key, $value);
- }
-
- return $validator->validate();
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/ArrayValidator.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/ArrayValidator.php
deleted file mode 100644
index ec5bdb0c2..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/ArrayValidator.php
+++ /dev/null
@@ -1,25 +0,0 @@
-value)) {
- throw new ConfigurationException("Option {$this->key} must be an array.");
- }
-
- return true;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/BooleanValidator.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/BooleanValidator.php
deleted file mode 100644
index 23b48469c..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/BooleanValidator.php
+++ /dev/null
@@ -1,25 +0,0 @@
-value)) {
- throw new ConfigurationException("Option {$this->key} must be a boolean.");
- }
-
- return true;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/ClassValidator.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/ClassValidator.php
deleted file mode 100644
index 924c35f48..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/ClassValidator.php
+++ /dev/null
@@ -1,24 +0,0 @@
-value)) {
- throw new ConfigurationException("Option {$this->key} must be a valid class.");
- }
-
- return true;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/IntegerValidator.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/IntegerValidator.php
deleted file mode 100644
index cd783c4b7..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/IntegerValidator.php
+++ /dev/null
@@ -1,25 +0,0 @@
-value)) {
- throw new ConfigurationException("Option {$this->key} must be an integer.");
- }
-
- return true;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/StringOrNullValidator.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/StringOrNullValidator.php
deleted file mode 100644
index 717c95237..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/StringOrNullValidator.php
+++ /dev/null
@@ -1,25 +0,0 @@
-value) || is_null($this->value)) {
- return true;
- }
-
- throw new ConfigurationException("Option {$this->key} must be a string or null.");
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/Validator.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/Validator.php
deleted file mode 100644
index 983c98cb3..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Configuration/Validators/Validator.php
+++ /dev/null
@@ -1,46 +0,0 @@
-key = $key;
- $this->value = $value;
- }
-
- /**
- * Validates the configuration value.
- *
- * @throws \Adldap\Configuration\ConfigurationException When the value given fails validation.
- *
- * @return bool
- */
- abstract public function validate();
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/ConnectionException.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/ConnectionException.php
deleted file mode 100644
index d8004e6cc..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/ConnectionException.php
+++ /dev/null
@@ -1,10 +0,0 @@
-errorCode = $errorCode;
- $this->errorMessage = $errorMessage;
- $this->diagnosticMessage = $diagnosticMessage;
- }
-
- /**
- * Returns the LDAP error code.
- *
- * @return int
- */
- public function getErrorCode()
- {
- return $this->errorCode;
- }
-
- /**
- * Returns the LDAP error message.
- *
- * @return string
- */
- public function getErrorMessage()
- {
- return $this->errorMessage;
- }
-
- /**
- * Returns the LDAP diagnostic message.
- *
- * @return string
- */
- public function getDiagnosticMessage()
- {
- return $this->diagnosticMessage;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/Ldap.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/Ldap.php
deleted file mode 100644
index 2ce83fd24..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/Ldap.php
+++ /dev/null
@@ -1,545 +0,0 @@
-name = $name;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isUsingSSL()
- {
- return $this->useSSL;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isUsingTLS()
- {
- return $this->useTLS;
- }
-
- /**
- * {@inheritdoc}
- */
- public function isBound()
- {
- return $this->bound;
- }
-
- /**
- * {@inheritdoc}
- */
- public function canChangePasswords()
- {
- return $this->isUsingSSL() || $this->isUsingTLS();
- }
-
- /**
- * {@inheritdoc}
- */
- public function ssl($enabled = true)
- {
- $this->useSSL = $enabled;
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function tls($enabled = true)
- {
- $this->useTLS = $enabled;
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getHost()
- {
- return $this->host;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getEntries($searchResults)
- {
- return ldap_get_entries($this->connection, $searchResults);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getFirstEntry($searchResults)
- {
- return ldap_first_entry($this->connection, $searchResults);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getNextEntry($entry)
- {
- return ldap_next_entry($this->connection, $entry);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getAttributes($entry)
- {
- return ldap_get_attributes($this->connection, $entry);
- }
-
- /**
- * {@inheritdoc}
- */
- public function countEntries($searchResults)
- {
- return ldap_count_entries($this->connection, $searchResults);
- }
-
- /**
- * {@inheritdoc}
- */
- public function compare($dn, $attribute, $value)
- {
- return ldap_compare($this->connection, $dn, $attribute, $value);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getLastError()
- {
- return ldap_error($this->connection);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getDetailedError()
- {
- // If the returned error number is zero, the last LDAP operation
- // succeeded. We won't return a detailed error.
- if ($number = $this->errNo()) {
- ldap_get_option($this->connection, LDAP_OPT_DIAGNOSTIC_MESSAGE, $message);
-
- return new DetailedError($number, $this->err2Str($number), $message);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getValuesLen($entry, $attribute)
- {
- return ldap_get_values_len($this->connection, $entry, $attribute);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setOption($option, $value)
- {
- return ldap_set_option($this->connection, $option, $value);
- }
-
- /**
- * {@inheritdoc}
- */
- public function setOptions(array $options = [])
- {
- foreach ($options as $option => $value) {
- $this->setOption($option, $value);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function setRebindCallback(callable $callback)
- {
- return ldap_set_rebind_proc($this->connection, $callback);
- }
-
- /**
- * {@inheritdoc}
- */
- public function startTLS()
- {
- try {
- return ldap_start_tls($this->connection);
- } catch (\ErrorException $e) {
- throw new ConnectionException($e->getMessage(), $e->getCode(), $e);
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function connect($hosts = [], $port = 389)
- {
- $this->host = $this->getConnectionString($hosts, $this->getProtocol(), $port);
-
- // Reset the bound status if reinitializing the connection.
- $this->bound = false;
-
- return $this->connection = ldap_connect($this->host);
- }
-
- /**
- * {@inheritdoc}
- */
- public function close()
- {
- $connection = $this->connection;
-
- $result = is_resource($connection) ? ldap_close($connection) : false;
-
- $this->bound = false;
-
- return $result;
- }
-
- /**
- * {@inheritdoc}
- */
- public function search($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0)
- {
- return ldap_search($this->connection, $dn, $filter, $fields, $onlyAttributes, $size, $time);
- }
-
- /**
- * {@inheritdoc}
- */
- public function listing($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0)
- {
- return ldap_list($this->connection, $dn, $filter, $fields, $onlyAttributes, $size, $time);
- }
-
- /**
- * {@inheritdoc}
- */
- public function read($dn, $filter, array $fields, $onlyAttributes = false, $size = 0, $time = 0)
- {
- return ldap_read($this->connection, $dn, $filter, $fields, $onlyAttributes, $size, $time);
- }
-
- /**
- * Extract information from an LDAP result.
- *
- * @link https://www.php.net/manual/en/function.ldap-parse-result.php
- *
- * @param resource $result
- * @param int $errorCode
- * @param string $dn
- * @param string $errorMessage
- * @param array $referrals
- * @param array $serverControls
- *
- * @return bool
- */
- public function parseResult($result, &$errorCode, &$dn, &$errorMessage, &$referrals, &$serverControls = [])
- {
- return $this->supportsServerControlsInMethods() && !empty($serverControls) ?
- ldap_parse_result($this->connection, $result, $errorCode, $dn, $errorMessage, $referrals, $serverControls) :
- ldap_parse_result($this->connection, $result, $errorCode, $dn, $errorMessage, $referrals);
- }
-
- /**
- * {@inheritdoc}
- */
- public function bind($username, $password, $sasl = false)
- {
- // Prior to binding, we will upgrade our connectivity to TLS on our current
- // connection and ensure we are not already bound before upgrading.
- // This is to prevent subsequent upgrading on several binds.
- if ($this->isUsingTLS() && !$this->isBound()) {
- $this->startTLS();
- }
-
- if ($sasl) {
- return $this->bound = ldap_sasl_bind($this->connection, null, null, 'GSSAPI');
- }
-
- return $this->bound = ldap_bind(
- $this->connection,
- $username,
- html_entity_decode($password)
- );
- }
-
- /**
- * {@inheritdoc}
- */
- public function add($dn, array $entry)
- {
- return ldap_add($this->connection, $dn, $entry);
- }
-
- /**
- * {@inheritdoc}
- */
- public function delete($dn)
- {
- return ldap_delete($this->connection, $dn);
- }
-
- /**
- * {@inheritdoc}
- */
- public function rename($dn, $newRdn, $newParent, $deleteOldRdn = false)
- {
- return ldap_rename($this->connection, $dn, $newRdn, $newParent, $deleteOldRdn);
- }
-
- /**
- * {@inheritdoc}
- */
- public function modify($dn, array $entry)
- {
- return ldap_modify($this->connection, $dn, $entry);
- }
-
- /**
- * {@inheritdoc}
- */
- public function modifyBatch($dn, array $values)
- {
- return ldap_modify_batch($this->connection, $dn, $values);
- }
-
- /**
- * {@inheritdoc}
- */
- public function modAdd($dn, array $entry)
- {
- return ldap_mod_add($this->connection, $dn, $entry);
- }
-
- /**
- * {@inheritdoc}
- */
- public function modReplace($dn, array $entry)
- {
- return ldap_mod_replace($this->connection, $dn, $entry);
- }
-
- /**
- * {@inheritdoc}
- */
- public function modDelete($dn, array $entry)
- {
- return ldap_mod_del($this->connection, $dn, $entry);
- }
-
- /**
- * {@inheritdoc}
- */
- public function controlPagedResult($pageSize = 1000, $isCritical = false, $cookie = '')
- {
- return ldap_control_paged_result($this->connection, $pageSize, $isCritical, $cookie);
- }
-
- /**
- * {@inheritdoc}
- */
- public function controlPagedResultResponse($result, &$cookie)
- {
- return ldap_control_paged_result_response($this->connection, $result, $cookie);
- }
-
- /**
- * {@inheritdoc}
- */
- public function freeResult($result)
- {
- return ldap_free_result($result);
- }
-
- /**
- * {@inheritdoc}
- */
- public function errNo()
- {
- return ldap_errno($this->connection);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getExtendedError()
- {
- return $this->getDiagnosticMessage();
- }
-
- /**
- * {@inheritdoc}
- */
- public function getExtendedErrorHex()
- {
- if (preg_match("/(?<=data\s).*?(?=\,)/", $this->getExtendedError(), $code)) {
- return $code[0];
- }
- }
-
- /**
- * {@inheritdoc}
- */
- public function getExtendedErrorCode()
- {
- return $this->extractDiagnosticCode($this->getExtendedError());
- }
-
- /**
- * {@inheritdoc}
- */
- public function err2Str($number)
- {
- return ldap_err2str($number);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getDiagnosticMessage()
- {
- ldap_get_option($this->connection, LDAP_OPT_ERROR_STRING, $message);
-
- return $message;
- }
-
- /**
- * {@inheritdoc}
- */
- public function extractDiagnosticCode($message)
- {
- preg_match('/^([\da-fA-F]+):/', $message, $matches);
-
- return isset($matches[1]) ? $matches[1] : false;
- }
-
- /**
- * Returns the LDAP protocol to utilize for the current connection.
- *
- * @return string
- */
- public function getProtocol()
- {
- return $this->isUsingSSL() ? $this::PROTOCOL_SSL : $this::PROTOCOL;
- }
-
- /**
- * Determine if the current PHP version supports server controls.
- *
- * @return bool
- */
- public function supportsServerControlsInMethods()
- {
- return version_compare(PHP_VERSION, '7.3.0') >= 0;
- }
-
- /**
- * Generates an LDAP connection string for each host given.
- *
- * @param string|array $hosts
- * @param string $protocol
- * @param string $port
- *
- * @return string
- */
- protected function getConnectionString($hosts, $protocol, $port)
- {
- // If we are using SSL and using the default port, we
- // will override it to use the default SSL port.
- if ($this->isUsingSSL() && $port == 389) {
- $port = self::PORT_SSL;
- }
-
- // Normalize hosts into an array.
- $hosts = is_array($hosts) ? $hosts : [$hosts];
-
- $hosts = array_map(function ($host) use ($protocol, $port) {
- return "{$protocol}{$host}:{$port}";
- }, $hosts);
-
- return implode(' ', $hosts);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/Provider.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/Provider.php
deleted file mode 100644
index c8db38706..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/Provider.php
+++ /dev/null
@@ -1,291 +0,0 @@
-setConfiguration($configuration)
- ->setConnection($connection);
- }
-
- /**
- * Does nothing. Implemented in order to remain backwards compatible.
- *
- * @deprecated since v10.3.0
- */
- public function __destruct()
- {
- //
- }
-
- /**
- * {@inheritdoc}
- */
- public function setConfiguration($configuration = [])
- {
- if (is_array($configuration)) {
- $configuration = new DomainConfiguration($configuration);
- }
-
- if ($configuration instanceof DomainConfiguration) {
- $this->configuration = $configuration;
-
- $schema = $configuration->get('schema');
-
- // We will update our schema here when our configuration is set.
- $this->setSchema(new $schema());
-
- return $this;
- }
-
- $class = DomainConfiguration::class;
-
- throw new InvalidArgumentException(
- "Configuration must be array or instance of $class"
- );
- }
-
- /**
- * {@inheritdoc}
- */
- public function setConnection(ConnectionInterface $connection = null)
- {
- // We will create a standard connection if one isn't given.
- $this->connection = $connection ?: new Ldap();
-
- // Prepare the connection.
- $this->prepareConnection();
-
- // Instantiate the LDAP connection.
- $this->connection->connect(
- $this->configuration->get('hosts'),
- $this->configuration->get('port')
- );
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setSchema(SchemaInterface $schema = null)
- {
- $this->schema = $schema ?: new ActiveDirectory();
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function setGuard(GuardInterface $guard)
- {
- $this->guard = $guard;
-
- return $this;
- }
-
- /**
- * Sets the cache store.
- *
- * @param CacheInterface $store
- *
- * @return $this
- */
- public function setCache(CacheInterface $store)
- {
- $this->cache = new Cache($store);
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getConfiguration()
- {
- return $this->configuration;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getSchema()
- {
- return $this->schema;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getGuard()
- {
- if (!$this->guard instanceof GuardInterface) {
- $this->setGuard($this->getDefaultGuard($this->connection, $this->configuration));
- }
-
- return $this->guard;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getDefaultGuard(ConnectionInterface $connection, DomainConfiguration $configuration)
- {
- $guard = new Guard($connection, $configuration);
-
- $guard->setDispatcher(Adldap::getEventDispatcher());
-
- return $guard;
- }
-
- /**
- * {@inheritdoc}
- */
- public function make()
- {
- return new ModelFactory(
- $this->search()->newQuery()
- );
- }
-
- /**
- * {@inheritdoc}
- */
- public function search()
- {
- $factory = new SearchFactory(
- $this->connection,
- $this->schema,
- $this->configuration->get('base_dn')
- );
-
- if ($this->cache) {
- $factory->setCache($this->cache);
- }
-
- return $factory;
- }
-
- /**
- * {@inheritdoc}
- */
- public function auth()
- {
- return $this->getGuard();
- }
-
- /**
- * {@inheritdoc}
- */
- public function connect($username = null, $password = null)
- {
- // Get the default guard instance.
- $guard = $this->getGuard();
-
- if (is_null($username) && is_null($password)) {
- // If both the username and password are null, we'll connect to the server
- // using the configured administrator username and password.
- $guard->bindAsAdministrator();
- } else {
- // Bind to the server with the specified username and password otherwise.
- $guard->bind($username, $password);
- }
-
- return $this;
- }
-
- /**
- * Prepares the connection by setting configured parameters.
- *
- * @throws \Adldap\Configuration\ConfigurationException When configuration options requested do not exist
- *
- * @return void
- */
- protected function prepareConnection()
- {
- if ($this->configuration->get('use_ssl')) {
- $this->connection->ssl();
- } elseif ($this->configuration->get('use_tls')) {
- $this->connection->tls();
- }
-
- $options = array_replace(
- $this->configuration->get('custom_options'),
- [
- LDAP_OPT_PROTOCOL_VERSION => $this->configuration->get('version'),
- LDAP_OPT_NETWORK_TIMEOUT => $this->configuration->get('timeout'),
- LDAP_OPT_REFERRALS => $this->configuration->get('follow_referrals'),
- ]
- );
-
- $this->connection->setOptions($options);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/ProviderInterface.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/ProviderInterface.php
deleted file mode 100644
index 20749a7e0..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Connections/ProviderInterface.php
+++ /dev/null
@@ -1,129 +0,0 @@
-setupWildcardListen($event, $listener);
- } else {
- $this->listeners[$event][] = $this->makeListener($listener);
- }
- }
- }
-
- /**
- * Setup a wildcard listener callback.
- *
- * @param string $event
- * @param mixed $listener
- *
- * @return void
- */
- protected function setupWildcardListen($event, $listener)
- {
- $this->wildcards[$event][] = $this->makeListener($listener, true);
-
- $this->wildcardsCache = [];
- }
-
- /**
- * {@inheritdoc}
- */
- public function hasListeners($eventName)
- {
- return isset($this->listeners[$eventName]) || isset($this->wildcards[$eventName]);
- }
-
- /**
- * {@inheritdoc}
- */
- public function until($event, $payload = [])
- {
- return $this->dispatch($event, $payload, true);
- }
-
- /**
- * {@inheritdoc}
- */
- public function fire($event, $payload = [], $halt = false)
- {
- return $this->dispatch($event, $payload, $halt);
- }
-
- /**
- * {@inheritdoc}
- */
- public function dispatch($event, $payload = [], $halt = false)
- {
- // When the given "event" is actually an object we will assume it is an event
- // object and use the class as the event name and this event itself as the
- // payload to the handler, which makes object based events quite simple.
- list($event, $payload) = $this->parseEventAndPayload(
- $event,
- $payload
- );
-
- $responses = [];
-
- foreach ($this->getListeners($event) as $listener) {
- $response = $listener($event, $payload);
-
- // If a response is returned from the listener and event halting is enabled
- // we will just return this response, and not call the rest of the event
- // listeners. Otherwise we will add the response on the response list.
- if ($halt && !is_null($response)) {
- return $response;
- }
-
- // If a boolean false is returned from a listener, we will stop propagating
- // the event to any further listeners down in the chain, else we keep on
- // looping through the listeners and firing every one in our sequence.
- if ($response === false) {
- break;
- }
-
- $responses[] = $response;
- }
-
- return $halt ? null : $responses;
- }
-
- /**
- * Parse the given event and payload and prepare them for dispatching.
- *
- * @param mixed $event
- * @param mixed $payload
- *
- * @return array
- */
- protected function parseEventAndPayload($event, $payload)
- {
- if (is_object($event)) {
- list($payload, $event) = [[$event], get_class($event)];
- }
-
- return [$event, Arr::wrap($payload)];
- }
-
- /**
- * {@inheritdoc}
- */
- public function getListeners($eventName)
- {
- $listeners = $this->listeners[$eventName] ?? [];
-
- $listeners = array_merge(
- $listeners,
- $this->wildcardsCache[$eventName] ?? $this->getWildcardListeners($eventName)
- );
-
- return class_exists($eventName, false)
- ? $this->addInterfaceListeners($eventName, $listeners)
- : $listeners;
- }
-
- /**
- * Get the wildcard listeners for the event.
- *
- * @param string $eventName
- *
- * @return array
- */
- protected function getWildcardListeners($eventName)
- {
- $wildcards = [];
-
- foreach ($this->wildcards as $key => $listeners) {
- if ($this->wildcardContainsEvent($key, $eventName)) {
- $wildcards = array_merge($wildcards, $listeners);
- }
- }
-
- return $this->wildcardsCache[$eventName] = $wildcards;
- }
-
- /**
- * Determine if the wildcard matches or contains the given event.
- *
- * This function is a direct excerpt from Laravel's Str::is().
- *
- * @param string $wildcard
- * @param string $eventName
- *
- * @return bool
- */
- protected function wildcardContainsEvent($wildcard, $eventName)
- {
- $patterns = Arr::wrap($wildcard);
-
- if (empty($patterns)) {
- return false;
- }
-
- foreach ($patterns as $pattern) {
- // If the given event is an exact match we can of course return true right
- // from the beginning. Otherwise, we will translate asterisks and do an
- // actual pattern match against the two strings to see if they match.
- if ($pattern == $eventName) {
- return true;
- }
-
- $pattern = preg_quote($pattern, '#');
-
- // Asterisks are translated into zero-or-more regular expression wildcards
- // to make it convenient to check if the strings starts with the given
- // pattern such as "library/*", making any string check convenient.
- $pattern = str_replace('\*', '.*', $pattern);
-
- if (preg_match('#^'.$pattern.'\z#u', $eventName) === 1) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Add the listeners for the event's interfaces to the given array.
- *
- * @param string $eventName
- * @param array $listeners
- *
- * @return array
- */
- protected function addInterfaceListeners($eventName, array $listeners = [])
- {
- foreach (class_implements($eventName) as $interface) {
- if (isset($this->listeners[$interface])) {
- foreach ($this->listeners[$interface] as $names) {
- $listeners = array_merge($listeners, (array) $names);
- }
- }
- }
-
- return $listeners;
- }
-
- /**
- * Register an event listener with the dispatcher.
- *
- * @param \Closure|string $listener
- * @param bool $wildcard
- *
- * @return \Closure
- */
- public function makeListener($listener, $wildcard = false)
- {
- if (is_string($listener)) {
- return $this->createClassListener($listener, $wildcard);
- }
-
- return function ($event, $payload) use ($listener, $wildcard) {
- if ($wildcard) {
- return $listener($event, $payload);
- }
-
- return $listener(...array_values($payload));
- };
- }
-
- /**
- * Create a class based listener.
- *
- * @param string $listener
- * @param bool $wildcard
- *
- * @return \Closure
- */
- protected function createClassListener($listener, $wildcard = false)
- {
- return function ($event, $payload) use ($listener, $wildcard) {
- if ($wildcard) {
- return call_user_func($this->parseListenerCallback($listener), $event, $payload);
- }
-
- return call_user_func_array(
- $this->parseListenerCallback($listener),
- $payload
- );
- };
- }
-
- /**
- * Parse the class listener into class and method.
- *
- * @param string $listener
- *
- * @return array
- */
- protected function parseListenerCallback($listener)
- {
- return strpos($listener, '@') !== false ?
- explode('@', $listener, 2) :
- [$listener, 'handle'];
- }
-
- /**
- * {@inheritdoc}
- */
- public function forget($event)
- {
- if (strpos($event, '*') !== false) {
- unset($this->wildcards[$event]);
- } else {
- unset($this->listeners[$event]);
- }
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Events/DispatcherInterface.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Events/DispatcherInterface.php
deleted file mode 100644
index e014543f5..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Events/DispatcherInterface.php
+++ /dev/null
@@ -1,75 +0,0 @@
-logger = $logger;
- }
-
- /**
- * Logs the given event.
- *
- * @param mixed $event
- */
- public function log($event)
- {
- if ($event instanceof AuthEvent) {
- $this->auth($event);
- } elseif ($event instanceof ModelEvent) {
- $this->model($event);
- } elseif ($event instanceof QueryEvent) {
- $this->query($event);
- }
- }
-
- /**
- * Logs an authentication event.
- *
- * @param AuthEvent $event
- *
- * @return void
- */
- public function auth(AuthEvent $event)
- {
- if (isset($this->logger)) {
- $connection = $event->getConnection();
-
- $message = "LDAP ({$connection->getHost()})"
- ." - Connection: {$connection->getName()}"
- ." - Operation: {$this->getOperationName($event)}"
- ." - Username: {$event->getUsername()}";
-
- $result = null;
- $type = 'info';
-
- if (is_a($event, Failed::class)) {
- $type = 'warning';
- $result = " - Reason: {$connection->getLastError()}";
- }
-
- $this->logger->$type($message.$result);
- }
- }
-
- /**
- * Logs a model event.
- *
- * @param ModelEvent $event
- *
- * @return void
- */
- public function model(ModelEvent $event)
- {
- if (isset($this->logger)) {
- $model = $event->getModel();
-
- $on = get_class($model);
-
- $connection = $model->getQuery()->getConnection();
-
- $message = "LDAP ({$connection->getHost()})"
- ." - Connection: {$connection->getName()}"
- ." - Operation: {$this->getOperationName($event)}"
- ." - On: {$on}"
- ." - Distinguished Name: {$model->getDn()}";
-
- $this->logger->info($message);
- }
- }
-
- /**
- * Logs a query event.
- *
- * @param QueryEvent $event
- *
- * @return void
- */
- public function query(QueryEvent $event)
- {
- if (isset($this->logger)) {
- $query = $event->getQuery();
-
- $connection = $query->getConnection();
-
- $selected = implode(',', $query->getSelects());
-
- $message = "LDAP ({$connection->getHost()})"
- ." - Connection: {$connection->getName()}"
- ." - Operation: {$this->getOperationName($event)}"
- ." - Base DN: {$query->getDn()}"
- ." - Filter: {$query->getUnescapedQuery()}"
- ." - Selected: ({$selected})"
- ." - Time Elapsed: {$event->getTime()}";
-
- $this->logger->info($message);
- }
- }
-
- /**
- * Returns the operational name of the given event.
- *
- * @param mixed $event
- *
- * @return string
- */
- protected function getOperationName($event)
- {
- return (new ReflectionClass($event))->getShortName();
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Log/LogsInformation.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Log/LogsInformation.php
deleted file mode 100644
index d6f5191cc..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Log/LogsInformation.php
+++ /dev/null
@@ -1,47 +0,0 @@
-apply($flag);
- }
- }
-
- /**
- * Get the value when casted to string.
- *
- * @return string
- */
- public function __toString()
- {
- return (string) $this->getValue();
- }
-
- /**
- * Get the value when casted to int.
- *
- * @return int
- */
- public function __toInt()
- {
- return $this->getValue();
- }
-
- /**
- * Add the value to the account control values.
- *
- * @param int $value
- *
- * @return AccountControl
- */
- public function add($value)
- {
- // Use the value as a key so if the same value
- // is used, it will always be overwritten
- $this->values[$value] = $value;
-
- return $this;
- }
-
- /**
- * Remove the value from the account control.
- *
- * @param int $value
- *
- * @return $this
- */
- public function remove($value)
- {
- unset($this->values[$value]);
-
- return $this;
- }
-
- /**
- * Extract and apply the flag.
- *
- * @param int $flag
- */
- public function apply($flag)
- {
- $this->setValues($this->extractFlags($flag));
- }
-
- /**
- * Determine if the current AccountControl object contains the given UAC flag(s).
- *
- * @param int $flag
- *
- * @return bool
- */
- public function has($flag)
- {
- // We'll extract the given flag into an array of possible flags, and
- // see if our AccountControl object contains any of them.
- $flagsUsed = array_intersect($this->extractFlags($flag), $this->values);
-
- return in_array($flag, $flagsUsed);
- }
-
- /**
- * The logon script will be run.
- *
- * @return AccountControl
- */
- public function runLoginScript()
- {
- return $this->add(static::SCRIPT);
- }
-
- /**
- * The user account is locked.
- *
- * @return AccountControl
- */
- public function accountIsLocked()
- {
- return $this->add(static::LOCKOUT);
- }
-
- /**
- * The user account is disabled.
- *
- * @return AccountControl
- */
- public function accountIsDisabled()
- {
- return $this->add(static::ACCOUNTDISABLE);
- }
-
- /**
- * This is an account for users whose primary account is in another domain.
- *
- * This account provides user access to this domain, but not to any domain that
- * trusts this domain. This is sometimes referred to as a local user account.
- *
- * @return AccountControl
- */
- public function accountIsTemporary()
- {
- return $this->add(static::TEMP_DUPLICATE_ACCOUNT);
- }
-
- /**
- * This is a default account type that represents a typical user.
- *
- * @return AccountControl
- */
- public function accountIsNormal()
- {
- return $this->add(static::NORMAL_ACCOUNT);
- }
-
- /**
- * This is a permit to trust an account for a system domain that trusts other domains.
- *
- * @return AccountControl
- */
- public function accountIsForInterdomain()
- {
- return $this->add(static::INTERDOMAIN_TRUST_ACCOUNT);
- }
-
- /**
- * This is a computer account for a computer that is running Microsoft
- * Windows NT 4.0 Workstation, Microsoft Windows NT 4.0 Server, Microsoft
- * Windows 2000 Professional, or Windows 2000 Server and is a member of this domain.
- *
- * @return AccountControl
- */
- public function accountIsForWorkstation()
- {
- return $this->add(static::WORKSTATION_TRUST_ACCOUNT);
- }
-
- /**
- * This is a computer account for a domain controller that is a member of this domain.
- *
- * @return AccountControl
- */
- public function accountIsForServer()
- {
- return $this->add(static::SERVER_TRUST_ACCOUNT);
- }
-
- /**
- * This is an MNS logon account.
- *
- * @return AccountControl
- */
- public function accountIsMnsLogon()
- {
- return $this->add(static::MNS_LOGON_ACCOUNT);
- }
-
- /**
- * (Windows 2000/Windows Server 2003) This account does
- * not require Kerberos pre-authentication for logging on.
- *
- * @return AccountControl
- */
- public function accountDoesNotRequirePreAuth()
- {
- return $this->add(static::DONT_REQ_PREAUTH);
- }
-
- /**
- * When this flag is set, it forces the user to log on by using a smart card.
- *
- * @return AccountControl
- */
- public function accountRequiresSmartCard()
- {
- return $this->add(static::SMARTCARD_REQUIRED);
- }
-
- /**
- * (Windows Server 2008/Windows Server 2008 R2) The account is a read-only domain controller (RODC).
- *
- * This is a security-sensitive setting. Removing this setting from an RODC compromises security on that server.
- *
- * @return AccountControl
- */
- public function accountIsReadOnly()
- {
- return $this->add(static::PARTIAL_SECRETS_ACCOUNT);
- }
-
- /**
- * The home folder is required.
- *
- * @return AccountControl
- */
- public function homeFolderIsRequired()
- {
- return $this->add(static::HOMEDIR_REQUIRED);
- }
-
- /**
- * No password is required.
- *
- * @return AccountControl
- */
- public function passwordIsNotRequired()
- {
- return $this->add(static::PASSWD_NOTREQD);
- }
-
- /**
- * The user cannot change the password. This is a permission on the user's object.
- *
- * For information about how to programmatically set this permission, visit the following link:
- *
- * @link http://msdn2.microsoft.com/en-us/library/aa746398.aspx
- *
- * @return AccountControl
- */
- public function passwordCannotBeChanged()
- {
- return $this->add(static::PASSWD_NOTREQD);
- }
-
- /**
- * Represents the password, which should never expire on the account.
- *
- * @return AccountControl
- */
- public function passwordDoesNotExpire()
- {
- return $this->add(static::DONT_EXPIRE_PASSWORD);
- }
-
- /**
- * (Windows 2000/Windows Server 2003) The user's password has expired.
- *
- * @return AccountControl
- */
- public function passwordIsExpired()
- {
- return $this->add(static::PASSWORD_EXPIRED);
- }
-
- /**
- * The user can send an encrypted password.
- *
- * @return AccountControl
- */
- public function allowEncryptedTextPassword()
- {
- return $this->add(static::ENCRYPTED_TEXT_PWD_ALLOWED);
- }
-
- /**
- * When this flag is set, the service account (the user or computer account)
- * under which a service runs is trusted for Kerberos delegation.
- *
- * Any such service can impersonate a client requesting the service.
- *
- * To enable a service for Kerberos delegation, you must set this
- * flag on the userAccountControl property of the service account.
- *
- * @return AccountControl
- */
- public function trustForDelegation()
- {
- return $this->add(static::TRUSTED_FOR_DELEGATION);
- }
-
- /**
- * (Windows 2000/Windows Server 2003) The account is enabled for delegation.
- *
- * This is a security-sensitive setting. Accounts that have this option enabled
- * should be tightly controlled. This setting lets a service that runs under the
- * account assume a client's identity and authenticate as that user to other remote
- * servers on the network.
- *
- * @return AccountControl
- */
- public function trustToAuthForDelegation()
- {
- return $this->add(static::TRUSTED_TO_AUTH_FOR_DELEGATION);
- }
-
- /**
- * When this flag is set, the security context of the user is not delegated to a
- * service even if the service account is set as trusted for Kerberos delegation.
- *
- * @return AccountControl
- */
- public function doNotTrustForDelegation()
- {
- return $this->add(static::NOT_DELEGATED);
- }
-
- /**
- * (Windows 2000/Windows Server 2003) Restrict this principal to
- * use only Data Encryption Standard (DES) encryption types for keys.
- *
- * @return AccountControl
- */
- public function useDesKeyOnly()
- {
- return $this->add(static::USE_DES_KEY_ONLY);
- }
-
- /**
- * Get the account control value.
- *
- * @return int
- */
- public function getValue()
- {
- return array_sum($this->values);
- }
-
- /**
- * Get the account control flag values.
- *
- * @return array
- */
- public function getValues()
- {
- return $this->values;
- }
-
- /**
- * Set the account control values.
- *
- * @param array $flags
- */
- public function setValues(array $flags)
- {
- $this->values = $flags;
- }
-
- /**
- * Get all possible account control flags.
- *
- * @return array
- */
- public function getAllFlags()
- {
- return (new ReflectionClass(__CLASS__))->getConstants();
- }
-
- /**
- * Extracts the given flag into an array of flags used.
- *
- * @param int $flag
- *
- * @return array
- */
- public function extractFlags($flag)
- {
- $flags = [];
-
- for ($i = 0; $i <= 26; $i++) {
- if ((int) $flag & (1 << $i)) {
- $flags[1 << $i] = 1 << $i;
- }
- }
-
- return $flags;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/DistinguishedName.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/DistinguishedName.php
deleted file mode 100644
index e610dbfda..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/DistinguishedName.php
+++ /dev/null
@@ -1,312 +0,0 @@
- [],
- 'uid' => [],
- 'ou' => [],
- 'dc' => [],
- 'o' => [],
- ];
-
- /**
- * Constructor.
- *
- * @param mixed $baseDn
- */
- public function __construct($baseDn = null)
- {
- $this->setBase($baseDn);
- }
-
- /**
- * Returns the complete distinguished name.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->get();
- }
-
- /**
- * Returns the complete distinguished name by assembling the RDN components.
- *
- * @return string
- */
- public function get()
- {
- $components = [];
-
- // We'll go through each component type and assemble its RDN.
- foreach ($this->components as $component => $values) {
- array_map(function ($value) use ($component, &$components) {
- // Assemble the component and escape the value.
- $components[] = sprintf('%s=%s', $component, ldap_escape($value, '', 2));
- }, $values);
- }
-
- return implode(',', $components);
- }
-
- /**
- * Adds a domain component.
- *
- * @param string $dc
- *
- * @return DistinguishedName
- */
- public function addDc($dc)
- {
- $this->addComponent('dc', $dc);
-
- return $this;
- }
-
- /**
- * Removes a domain component.
- *
- * @param string $dc
- *
- * @return DistinguishedName
- */
- public function removeDc($dc)
- {
- $this->removeComponent('dc', $dc);
-
- return $this;
- }
-
- /**
- * Adds an organization name.
- *
- * @param string $o
- *
- * @return $this
- */
- public function addO($o)
- {
- $this->addComponent('o', $o);
-
- return $this;
- }
-
- /**
- * Removes an organization name.
- *
- * @param string $o
- *
- * @return DistinguishedName
- */
- public function removeO($o)
- {
- $this->removeComponent('o', $o);
-
- return $this;
- }
-
- /**
- * Add a user identifier.
- *
- * @param string $uid
- *
- * @return DistinguishedName
- */
- public function addUid($uid)
- {
- $this->addComponent('uid', $uid);
-
- return $this;
- }
-
- /**
- * Removes a user identifier.
- *
- * @param string $uid
- *
- * @return DistinguishedName
- */
- public function removeUid($uid)
- {
- $this->removeComponent('uid', $uid);
-
- return $this;
- }
-
- /**
- * Adds a common name.
- *
- * @param string $cn
- *
- * @return DistinguishedName
- */
- public function addCn($cn)
- {
- $this->addComponent('cn', $cn);
-
- return $this;
- }
-
- /**
- * Removes a common name.
- *
- * @param string $cn
- *
- * @return DistinguishedName
- */
- public function removeCn($cn)
- {
- $this->removeComponent('cn', $cn);
-
- return $this;
- }
-
- /**
- * Adds an organizational unit.
- *
- * @param string $ou
- *
- * @return DistinguishedName
- */
- public function addOu($ou)
- {
- $this->addComponent('ou', $ou);
-
- return $this;
- }
-
- /**
- * Removes an organizational unit.
- *
- * @param string $ou
- *
- * @return DistinguishedName
- */
- public function removeOu($ou)
- {
- $this->removeComponent('ou', $ou);
-
- return $this;
- }
-
- /**
- * Sets the base RDN of the distinguished name.
- *
- * @param string|DistinguishedName $base
- *
- * @return DistinguishedName
- */
- public function setBase($base)
- {
- // Typecast base to string in case we've been given
- // an instance of the distinguished name object.
- $base = (string) $base;
-
- // If the base DN isn't null we'll try to explode it.
- $base = Utilities::explodeDn($base, false) ?: [];
-
- // Remove the count key from the exploded distinguished name.
- unset($base['count']);
-
- foreach ($base as $key => $rdn) {
- // We'll break the RDN into pieces
- $pieces = explode('=', $rdn) ?: [];
-
- // If there's exactly 2 pieces, then we can work with it.
- if (count($pieces) === 2) {
- $attribute = ucfirst(strtolower($pieces[0]));
-
- $method = 'add'.$attribute;
-
- if (method_exists($this, $method)) {
- // We see what type of RDN it is and add each accordingly.
- call_user_func_array([$this, $method], [$pieces[1]]);
- }
- }
- }
-
- return $this;
- }
-
- /**
- * Returns an array of all components in the distinguished name.
- *
- * If a component name is given ('cn', 'dc' for example) then
- * the values of that component will be returned.
- *
- * @param string|null $component The component to retrieve values of
- *
- * @return array
- */
- public function getComponents($component = null)
- {
- if (is_null($component)) {
- return $this->components;
- }
-
- $this->validateComponentExists($component);
-
- return $this->components[$component];
- }
-
- /**
- * Adds a component to the distinguished name.
- *
- * @param string $component
- * @param string $value
- *
- * @throws \UnexpectedValueException When the given name does not exist.
- */
- protected function addComponent($component, $value)
- {
- $this->validateComponentExists($component);
-
- // We need to make sure the value we're given isn't empty before adding it into our components.
- if (!empty($value)) {
- $this->components[$component][] = $value;
- }
- }
-
- /**
- * Removes the given value from the given component.
- *
- * @param string $component
- * @param string $value
- *
- * @throws \UnexpectedValueException When the given component does not exist.
- *
- * @return void
- */
- protected function removeComponent($component, $value)
- {
- $this->validateComponentExists($component);
-
- $this->components[$component] = array_diff($this->components[$component], [$value]);
- }
-
- /**
- * Validates that the given component exists in the available components.
- *
- * @param string $component The name of the component to validate.
- *
- * @throws \UnexpectedValueException When the given component does not exist.
- *
- * @return void
- */
- protected function validateComponentExists($component)
- {
- if (!array_key_exists($component, $this->components)) {
- throw new \UnexpectedValueException("The RDN component '$component' does not exist.");
- }
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/Guid.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/Guid.php
deleted file mode 100644
index 6c6a60076..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/Guid.php
+++ /dev/null
@@ -1,157 +0,0 @@
-
- *
- * @link https://github.com/ldaptools/ldaptools
- *
- * @var array
- */
- protected $guidSections = [
- [[-26, 2], [-28, 2], [-30, 2], [-32, 2]],
- [[-22, 2], [-24, 2]],
- [[-18, 2], [-20, 2]],
- [[-16, 4]],
- [[-12, 12]],
- ];
-
- /**
- * The hexadecimal octet order based on string position.
- *
- * @author Chad Sikorra
- *
- * @link https://github.com/ldaptools/ldaptools
- *
- * @var array
- */
- protected $octetSections = [
- [6, 4, 2, 0],
- [10, 8],
- [14, 12],
- [16, 18, 20, 22, 24, 26, 28, 30],
- ];
-
- /**
- * Determines if the specified GUID is valid.
- *
- * @param string $guid
- *
- * @return bool
- */
- public static function isValid($guid)
- {
- return Utilities::isValidGuid($guid);
- }
-
- /**
- * Constructor.
- *
- * @param mixed $value
- *
- * @throws InvalidArgumentException
- */
- public function __construct($value)
- {
- if (static::isValid($value)) {
- $this->value = $value;
- } elseif ($value = $this->binaryGuidToString($value)) {
- $this->value = $value;
- } else {
- throw new InvalidArgumentException('Invalid Binary / String GUID.');
- }
- }
-
- /**
- * Returns the string value of the GUID.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->getValue();
- }
-
- /**
- * Returns the string value of the SID.
- *
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Get the binary representation of the GUID string.
- *
- * @return string
- */
- public function getBinary()
- {
- $data = '';
-
- $guid = str_replace('-', '', $this->value);
-
- foreach ($this->octetSections as $section) {
- $data .= $this->parseSection($guid, $section, true);
- }
-
- return hex2bin($data);
- }
-
- /**
- * Returns the string variant of a binary GUID.
- *
- * @param string $binary
- *
- * @return string|null
- */
- protected function binaryGuidToString($binary)
- {
- return Utilities::binaryGuidToString($binary);
- }
-
- /**
- * Return the specified section of the hexadecimal string.
- *
- * @author Chad Sikorra
- *
- * @link https://github.com/ldaptools/ldaptools
- *
- * @param string $hex The full hex string.
- * @param array $sections An array of start and length (unless octet is true, then length is always 2).
- * @param bool $octet Whether this is for octet string form.
- *
- * @return string The concatenated sections in upper-case.
- */
- protected function parseSection($hex, array $sections, $octet = false)
- {
- $parsedString = '';
-
- foreach ($sections as $section) {
- $start = $octet ? $section : $section[0];
-
- $length = $octet ? 2 : $section[1];
-
- $parsedString .= substr($hex, $start, $length);
- }
-
- return $parsedString;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/MbString.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/MbString.php
deleted file mode 100644
index 54a0db8e1..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/MbString.php
+++ /dev/null
@@ -1,80 +0,0 @@
-value = $value;
- } elseif ($value = $this->binarySidToString($value)) {
- $this->value = $value;
- } else {
- throw new InvalidArgumentException('Invalid Binary / String SID.');
- }
- }
-
- /**
- * Returns the string value of the SID.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->getValue();
- }
-
- /**
- * Returns the string value of the SID.
- *
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Returns the binary variant of the SID.
- *
- * @return string
- */
- public function getBinary()
- {
- $sid = explode('-', ltrim($this->value, 'S-'));
-
- $level = (int) array_shift($sid);
-
- $authority = (int) array_shift($sid);
-
- $subAuthorities = array_map('intval', $sid);
-
- $params = array_merge(
- ['C2xxNV*', $level, count($subAuthorities), $authority],
- $subAuthorities
- );
-
- return call_user_func_array('pack', $params);
- }
-
- /**
- * Returns the string variant of a binary SID.
- *
- * @param string $binary
- *
- * @return string|null
- */
- protected function binarySidToString($binary)
- {
- return Utilities::binarySidToString($binary);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/TSProperty.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/TSProperty.php
deleted file mode 100644
index aa3d63ca3..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/TSProperty.php
+++ /dev/null
@@ -1,396 +0,0 @@
- ['001011', '011010'],
- 'Y' => ['001110', '011010'],
- ];
-
- /**
- * The nibble header.
- */
- const NIBBLE_HEADER = '1110';
-
- /**
- * Conversion factor needed for time values in the TSPropertyArray (stored in microseconds).
- */
- const TIME_CONVERSION = 60 * 1000;
-
- /**
- * A simple map to help determine how the property needs to be decoded/encoded from/to its binary value.
- *
- * There are some names that are simple repeats but have 'W' at the end. Not sure as to what that signifies. I
- * cannot find any information on them in Microsoft documentation. However, their values appear to stay in sync with
- * their non 'W' counterparts. But not doing so when manipulating the data manually does not seem to affect anything.
- * This probably needs more investigation.
- *
- * @var array
- */
- protected $propTypes = [
- 'string' => [
- 'CtxWFHomeDir',
- 'CtxWFHomeDirW',
- 'CtxWFHomeDirDrive',
- 'CtxWFHomeDirDriveW',
- 'CtxInitialProgram',
- 'CtxInitialProgramW',
- 'CtxWFProfilePath',
- 'CtxWFProfilePathW',
- 'CtxWorkDirectory',
- 'CtxWorkDirectoryW',
- 'CtxCallbackNumber',
- ],
- 'time' => [
- 'CtxMaxDisconnectionTime',
- 'CtxMaxConnectionTime',
- 'CtxMaxIdleTime',
- ],
- 'int' => [
- 'CtxCfgFlags1',
- 'CtxCfgPresent',
- 'CtxKeyboardLayout',
- 'CtxMinEncryptionLevel',
- 'CtxNWLogonServer',
- 'CtxShadow',
- ],
- ];
-
- /**
- * The property name.
- *
- * @var string
- */
- protected $name;
-
- /**
- * The property value.
- *
- * @var string|int
- */
- protected $value;
-
- /**
- * The property value type.
- *
- * @var int
- */
- protected $valueType = 1;
-
- /**
- * Pass binary TSProperty data to construct its object representation.
- *
- * @param string|null $value
- */
- public function __construct($value = null)
- {
- if ($value) {
- $this->decode(bin2hex($value));
- }
- }
-
- /**
- * Set the name for the TSProperty.
- *
- * @param string $name
- *
- * @return TSProperty
- */
- public function setName($name)
- {
- $this->name = $name;
-
- return $this;
- }
-
- /**
- * Get the name for the TSProperty.
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Set the value for the TSProperty.
- *
- * @param string|int $value
- *
- * @return TSProperty
- */
- public function setValue($value)
- {
- $this->value = $value;
-
- return $this;
- }
-
- /**
- * Get the value for the TSProperty.
- *
- * @return string|int
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * Convert the TSProperty name/value back to its binary
- * representation for the userParameters blob.
- *
- * @return string
- */
- public function toBinary()
- {
- $name = bin2hex($this->name);
-
- $binValue = $this->getEncodedValueForProp($this->name, $this->value);
-
- $valueLen = strlen(bin2hex($binValue)) / 3;
-
- $binary = hex2bin(
- $this->dec2hex(strlen($name))
- .$this->dec2hex($valueLen)
- .$this->dec2hex($this->valueType)
- .$name
- );
-
- return $binary.$binValue;
- }
-
- /**
- * Given a TSProperty blob, decode the name/value/type/etc.
- *
- * @param string $tsProperty
- */
- protected function decode($tsProperty)
- {
- $nameLength = hexdec(substr($tsProperty, 0, 2));
-
- // 1 data byte is 3 encoded bytes
- $valueLength = hexdec(substr($tsProperty, 2, 2)) * 3;
-
- $this->valueType = hexdec(substr($tsProperty, 4, 2));
- $this->name = pack('H*', substr($tsProperty, 6, $nameLength));
- $this->value = $this->getDecodedValueForProp($this->name, substr($tsProperty, 6 + $nameLength, $valueLength));
- }
-
- /**
- * Based on the property name/value in question, get its encoded form.
- *
- * @param string $propName
- * @param string|int $propValue
- *
- * @return string
- */
- protected function getEncodedValueForProp($propName, $propValue)
- {
- if (in_array($propName, $this->propTypes['string'])) {
- // Simple strings are null terminated. Unsure if this is
- // needed or simply a product of how ADUC does stuff?
- $value = $this->encodePropValue($propValue."\0", true);
- } elseif (in_array($propName, $this->propTypes['time'])) {
- // Needs to be in microseconds (assuming it is in minute format)...
- $value = $this->encodePropValue($propValue * self::TIME_CONVERSION);
- } else {
- $value = $this->encodePropValue($propValue);
- }
-
- return $value;
- }
-
- /**
- * Based on the property name in question, get its actual value from the binary blob value.
- *
- * @param string $propName
- * @param string $propValue
- *
- * @return string|int
- */
- protected function getDecodedValueForProp($propName, $propValue)
- {
- if (in_array($propName, $this->propTypes['string'])) {
- // Strip away null terminators. I think this should
- // be desired, otherwise it just ends in confusion.
- $value = str_replace("\0", '', $this->decodePropValue($propValue, true));
- } elseif (in_array($propName, $this->propTypes['time'])) {
- // Convert from microseconds to minutes (how ADUC displays
- // it anyway, and seems the most practical).
- $value = hexdec($this->decodePropValue($propValue)) / self::TIME_CONVERSION;
- } elseif (in_array($propName, $this->propTypes['int'])) {
- $value = hexdec($this->decodePropValue($propValue));
- } else {
- $value = $this->decodePropValue($propValue);
- }
-
- return $value;
- }
-
- /**
- * Decode the property by inspecting the nibbles of each blob, checking
- * the control, and adding up the results into a final value.
- *
- * @param string $hex
- * @param bool $string Whether or not this is simple string data.
- *
- * @return string
- */
- protected function decodePropValue($hex, $string = false)
- {
- $decodePropValue = '';
-
- $blobs = str_split($hex, 6);
-
- foreach ($blobs as $blob) {
- $bin = decbin(hexdec($blob));
-
- $controlY = substr($bin, 4, 6);
- $nibbleY = substr($bin, 10, 4);
- $controlX = substr($bin, 14, 6);
- $nibbleX = substr($bin, 20, 4);
-
- $byte = $this->nibbleControl($nibbleX, $controlX).$this->nibbleControl($nibbleY, $controlY);
-
- if ($string) {
- $decodePropValue .= MbString::chr(bindec($byte));
- } else {
- $decodePropValue = $this->dec2hex(bindec($byte)).$decodePropValue;
- }
- }
-
- return $decodePropValue;
- }
-
- /**
- * Get the encoded property value as a binary blob.
- *
- * @param string $value
- * @param bool $string
- *
- * @return string
- */
- protected function encodePropValue($value, $string = false)
- {
- // An int must be properly padded. (then split and reversed).
- // For a string, we just split the chars. This seems
- // to be the easiest way to handle UTF-8 characters
- // instead of trying to work with their hex values.
- $chars = $string ? MbString::split($value) : array_reverse(str_split($this->dec2hex($value, 8), 2));
-
- $encoded = '';
-
- foreach ($chars as $char) {
- // Get the bits for the char. Using this method to ensure it is fully padded.
- $bits = sprintf('%08b', $string ? MbString::ord($char) : hexdec($char));
- $nibbleX = substr($bits, 0, 4);
- $nibbleY = substr($bits, 4, 4);
-
- // Construct the value with the header, high nibble, then low nibble.
- $value = self::NIBBLE_HEADER;
-
- foreach (['Y' => $nibbleY, 'X' => $nibbleX] as $nibbleType => $nibble) {
- $value .= $this->getNibbleWithControl($nibbleType, $nibble);
- }
-
- // Convert it back to a binary bit stream
- foreach ([0, 8, 16] as $start) {
- $encoded .= $this->packBitString(substr($value, $start, 8), 8);
- }
- }
-
- return $encoded;
- }
-
- /**
- * PHP's pack() function has no 'b' or 'B' template. This is
- * a workaround that turns a literal bit-string into a
- * packed byte-string with 8 bits per byte.
- *
- * @param string $bits
- * @param bool $len
- *
- * @return string
- */
- protected function packBitString($bits, $len)
- {
- $bits = substr($bits, 0, $len);
- // Pad input with zeros to next multiple of 4 above $len
- $bits = str_pad($bits, 4 * (int) (($len + 3) / 4), '0');
-
- // Split input into chunks of 4 bits, convert each to hex and pack them
- $nibbles = str_split($bits, 4);
- foreach ($nibbles as $i => $nibble) {
- $nibbles[$i] = base_convert($nibble, 2, 16);
- }
-
- return pack('H*', implode('', $nibbles));
- }
-
- /**
- * Based on the control, adjust the nibble accordingly.
- *
- * @param string $nibble
- * @param string $control
- *
- * @return string
- */
- protected function nibbleControl($nibble, $control)
- {
- // This control stays constant for the low/high nibbles,
- // so it doesn't matter which we compare to
- if ($control == self::NIBBLE_CONTROL['X'][1]) {
- $dec = bindec($nibble);
- $dec += 9;
- $nibble = str_pad(decbin($dec), 4, '0', STR_PAD_LEFT);
- }
-
- return $nibble;
- }
-
- /**
- * Get the nibble value with the control prefixed.
- *
- * If the nibble dec is <= 9, the control X equals 001011 and Y equals 001110, otherwise if the nibble dec is > 9
- * the control for X or Y equals 011010. Additionally, if the dec value of the nibble is > 9, then the nibble value
- * must be subtracted by 9 before the final value is constructed.
- *
- * @param string $nibbleType Either X or Y
- * @param string $nibble
- *
- * @return string
- */
- protected function getNibbleWithControl($nibbleType, $nibble)
- {
- $dec = bindec($nibble);
-
- if ($dec > 9) {
- $dec -= 9;
- $control = self::NIBBLE_CONTROL[$nibbleType][1];
- } else {
- $control = self::NIBBLE_CONTROL[$nibbleType][0];
- }
-
- return $control.sprintf('%04d', decbin($dec));
- }
-
- /**
- * Need to make sure hex values are always an even length, so pad as needed.
- *
- * @param int $int
- * @param int $padLength The hex string must be padded to this length (with zeros).
- *
- * @return string
- */
- protected function dec2hex($int, $padLength = 2)
- {
- return str_pad(dechex($int), $padLength, 0, STR_PAD_LEFT);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/TSPropertyArray.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/TSPropertyArray.php
deleted file mode 100644
index 4eac74b3b..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Attributes/TSPropertyArray.php
+++ /dev/null
@@ -1,295 +0,0 @@
- 2953518677,
- 'CtxWFProfilePath' => '',
- 'CtxWFProfilePathW' => '',
- 'CtxWFHomeDir' => '',
- 'CtxWFHomeDirW' => '',
- 'CtxWFHomeDirDrive' => '',
- 'CtxWFHomeDirDriveW' => '',
- 'CtxShadow' => 1,
- 'CtxMaxDisconnectionTime' => 0,
- 'CtxMaxConnectionTime' => 0,
- 'CtxMaxIdleTime' => 0,
- 'CtxWorkDirectory' => '',
- 'CtxWorkDirectoryW' => '',
- 'CtxCfgFlags1' => 2418077696,
- 'CtxInitialProgram' => '',
- 'CtxInitialProgramW' => '',
- ];
-
- /**
- * @var string The default data that occurs before the TSPropertyArray (CtxCfgPresent with a bunch of spaces...?)
- */
- protected $defaultPreBinary = '43747843666750726573656e742020202020202020202020202020202020202020202020202020202020202020202020';
-
- /**
- * @var TSProperty[]
- */
- protected $tsProperty = [];
-
- /**
- * @var string
- */
- protected $signature = self::VALID_SIGNATURE;
-
- /**
- * Binary data that occurs before the TSPropertyArray data in userParameters.
- *
- * @var string
- */
- protected $preBinary = '';
-
- /**
- * Binary data that occurs after the TSPropertyArray data in userParameters.
- *
- * @var string
- */
- protected $postBinary = '';
-
- /**
- * Construct in one of the following ways:.
- *
- * - Pass an array of TSProperty key => value pairs (See DEFAULTS constant).
- * - Pass the userParameters binary value. The object representation of that will be decoded and constructed.
- * - Pass nothing and a default set of TSProperty key => value pairs will be used (See DEFAULTS constant).
- *
- * @param mixed $tsPropertyArray
- */
- public function __construct($tsPropertyArray = null)
- {
- $this->preBinary = hex2bin($this->defaultPreBinary);
-
- if (is_null($tsPropertyArray) || is_array($tsPropertyArray)) {
- $tsPropertyArray = $tsPropertyArray ?: self::DEFAULTS;
-
- foreach ($tsPropertyArray as $key => $value) {
- $tsProperty = new TSProperty();
-
- $this->tsProperty[$key] = $tsProperty->setName($key)->setValue($value);
- }
- } else {
- $this->decodeUserParameters($tsPropertyArray);
- }
- }
-
- /**
- * Check if a specific TSProperty exists by its property name.
- *
- * @param string $propName
- *
- * @return bool
- */
- public function has($propName)
- {
- return array_key_exists(strtolower($propName), array_change_key_case($this->tsProperty));
- }
-
- /**
- * Get a TSProperty object by its property name (ie. CtxWFProfilePath).
- *
- * @param string $propName
- *
- * @return TSProperty
- */
- public function get($propName)
- {
- $this->validateProp($propName);
-
- return $this->getTsPropObj($propName);
- }
-
- /**
- * Add a TSProperty object. If it already exists, it will be overwritten.
- *
- * @param TSProperty $tsProperty
- *
- * @return $this
- */
- public function add(TSProperty $tsProperty)
- {
- $this->tsProperty[$tsProperty->getName()] = $tsProperty;
-
- return $this;
- }
-
- /**
- * Remove a TSProperty by its property name (ie. CtxMinEncryptionLevel).
- *
- * @param string $propName
- *
- * @return $this
- */
- public function remove($propName)
- {
- foreach (array_keys($this->tsProperty) as $property) {
- if (strtolower($propName) == strtolower($property)) {
- unset($this->tsProperty[$property]);
- }
- }
-
- return $this;
- }
-
- /**
- * Set the value for a specific TSProperty by its name.
- *
- * @param string $propName
- * @param mixed $propValue
- *
- * @return $this
- */
- public function set($propName, $propValue)
- {
- $this->validateProp($propName);
-
- $this->getTsPropObj($propName)->setValue($propValue);
-
- return $this;
- }
-
- /**
- * Get the full binary representation of the userParameters containing the TSPropertyArray data.
- *
- * @return string
- */
- public function toBinary()
- {
- $binary = $this->preBinary;
-
- $binary .= hex2bin(str_pad(dechex(MbString::ord($this->signature)), 2, 0, STR_PAD_LEFT));
-
- $binary .= hex2bin(str_pad(dechex(count($this->tsProperty)), 2, 0, STR_PAD_LEFT));
-
- foreach ($this->tsProperty as $tsProperty) {
- $binary .= $tsProperty->toBinary();
- }
-
- return $binary.$this->postBinary;
- }
-
- /**
- * Get a simple associative array containing of all TSProperty names and values.
- *
- * @return array
- */
- public function toArray()
- {
- $userParameters = [];
-
- foreach ($this->tsProperty as $property => $tsPropObj) {
- $userParameters[$property] = $tsPropObj->getValue();
- }
-
- return $userParameters;
- }
-
- /**
- * Get all TSProperty objects.
- *
- * @return TSProperty[]
- */
- public function getTSProperties()
- {
- return $this->tsProperty;
- }
-
- /**
- * Validates that the given property name exists.
- *
- * @param string $propName
- */
- protected function validateProp($propName)
- {
- if (!$this->has($propName)) {
- throw new InvalidArgumentException(sprintf('TSProperty for "%s" does not exist.', $propName));
- }
- }
-
- /**
- * @param string $propName
- *
- * @return TSProperty
- */
- protected function getTsPropObj($propName)
- {
- return array_change_key_case($this->tsProperty)[strtolower($propName)];
- }
-
- /**
- * Get an associative array with all of the userParameters property names and values.
- *
- * @param string $userParameters
- *
- * @return void
- */
- protected function decodeUserParameters($userParameters)
- {
- $userParameters = bin2hex($userParameters);
-
- // Save the 96-byte array of reserved data, so as to not ruin anything that may be stored there.
- $this->preBinary = hex2bin(substr($userParameters, 0, 96));
- // The signature is a 2-byte unicode character at the front
- $this->signature = MbString::chr(hexdec(substr($userParameters, 96, 2)));
- // This asserts the validity of the tsPropertyArray data. For some reason 'P' means valid...
- if ($this->signature != self::VALID_SIGNATURE) {
- throw new InvalidArgumentException('Invalid TSPropertyArray data');
- }
-
- // The property count is a 2-byte unsigned integer indicating the number of elements for the tsPropertyArray
- // It starts at position 98. The actual variable data begins at position 100.
- $length = $this->addTSPropData(substr($userParameters, 100), hexdec(substr($userParameters, 98, 2)));
-
- // Reserved data length + (count and sig length == 4) + the added lengths of the TSPropertyArray
- // This saves anything after that variable TSPropertyArray data, so as to not squash anything stored there
- if (strlen($userParameters) > (96 + 4 + $length)) {
- $this->postBinary = hex2bin(substr($userParameters, (96 + 4 + $length)));
- }
- }
-
- /**
- * Given the start of TSPropertyArray hex data, and the count for the number
- * of TSProperty structures in contains, parse and split out the
- * individual TSProperty structures. Return the full length
- * of the TSPropertyArray data.
- *
- * @param string $tsPropertyArray
- * @param int $tsPropCount
- *
- * @return int The length of the data in the TSPropertyArray
- */
- protected function addTSPropData($tsPropertyArray, $tsPropCount)
- {
- $length = 0;
-
- for ($i = 0; $i < $tsPropCount; $i++) {
- // Prop length = name length + value length + type length + the space for the length data.
- $propLength = hexdec(substr($tsPropertyArray, $length, 2)) + (hexdec(substr($tsPropertyArray, $length + 2, 2)) * 3) + 6;
-
- $tsProperty = new TSProperty(hex2bin(substr($tsPropertyArray, $length, $propLength)));
-
- $this->tsProperty[$tsProperty->getName()] = $tsProperty;
-
- $length += $propLength;
- }
-
- return $length;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/BatchModification.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/BatchModification.php
deleted file mode 100644
index 08ddca847..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/BatchModification.php
+++ /dev/null
@@ -1,270 +0,0 @@
-setAttribute($attribute)
- ->setType($type)
- ->setValues($values);
- }
-
- /**
- * Sets the original value of the attribute before modification.
- *
- * @param mixed $original
- *
- * @return $this
- */
- public function setOriginal($original = null)
- {
- $this->original = $original;
-
- return $this;
- }
-
- /**
- * Returns the original value of the attribute before modification.
- *
- * @return mixed
- */
- public function getOriginal()
- {
- return $this->original;
- }
-
- /**
- * Sets the attribute of the modification.
- *
- * @param string $attribute
- *
- * @return $this
- */
- public function setAttribute($attribute)
- {
- $this->attribute = $attribute;
-
- return $this;
- }
-
- /**
- * Returns the attribute of the modification.
- *
- * @return string
- */
- public function getAttribute()
- {
- return $this->attribute;
- }
-
- /**
- * Sets the values of the modification.
- *
- * @param array $values
- *
- * @return $this
- */
- public function setValues(array $values = [])
- {
- $this->values = array_map(function ($value) {
- // We need to make sure all values given to a batch modification are
- // strings, otherwise we'll receive an LDAP exception when
- // we try to process the modification.
- return (string) $value;
- }, $values);
-
- return $this;
- }
-
- /**
- * Returns the values of the modification.
- *
- * @return array
- */
- public function getValues()
- {
- return $this->values;
- }
-
- /**
- * Sets the type of the modification.
- *
- * @param int|null $type
- *
- * @return $this
- */
- public function setType($type = null)
- {
- if (!is_null($type) && !$this->isValidType($type)) {
- throw new InvalidArgumentException('Given batch modification type is invalid.');
- }
-
- $this->type = $type;
-
- return $this;
- }
-
- /**
- * Returns the type of the modification.
- *
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Determines if the batch modification
- * is valid in its current state.
- *
- * @return bool
- */
- public function isValid()
- {
- return !is_null($this->get());
- }
-
- /**
- * Builds the type of modification automatically
- * based on the current and original values.
- *
- * @return $this
- */
- public function build()
- {
- $filtered = array_diff(
- array_map('trim', $this->values),
- ['']
- );
-
- if (is_null($this->original)) {
- // If the original value is null, we'll assume
- // that the attribute doesn't exist yet.
- if (!empty($filtered)) {
- // If the filtered array is not empty, we can
- // assume we're looking to add values
- // to the current attribute.
- $this->setType(LDAP_MODIFY_BATCH_ADD);
- }
-
- // If the filtered array is empty and there is no original
- // value, then we can ignore this attribute since
- // we can't push null values to the server.
- } else {
- if (empty($filtered)) {
- // If there's an original value and the array is
- // empty then we can assume we are looking
- // to completely remove all values
- // of the current attribute.
- $this->setType(LDAP_MODIFY_BATCH_REMOVE_ALL);
- } else {
- // If the array isn't empty then we can assume
- // we're looking to replace all attributes.
- $this->setType(LDAP_MODIFY_BATCH_REPLACE);
- }
- }
-
- return $this;
- }
-
- /**
- * Returns the built batch modification array.
- *
- * @return array|null
- */
- public function get()
- {
- switch ($this->type) {
- case LDAP_MODIFY_BATCH_REMOVE_ALL:
- // A values key cannot be provided when
- // a remove all type is selected.
- return [
- static::KEY_ATTRIB => $this->attribute,
- static::KEY_MODTYPE => $this->type,
- ];
- case LDAP_MODIFY_BATCH_REMOVE:
- // Fallthrough.
- case LDAP_MODIFY_BATCH_ADD:
- // Fallthrough.
- case LDAP_MODIFY_BATCH_REPLACE:
- return [
- static::KEY_ATTRIB => $this->attribute,
- static::KEY_MODTYPE => $this->type,
- static::KEY_VALUES => $this->values,
- ];
- default:
- // If the modtype isn't recognized, we'll return null.
- return;
- }
- }
-
- /**
- * Determines if the given modtype is valid.
- *
- * @param int $type
- *
- * @return bool
- */
- protected function isValidType($type)
- {
- return in_array($type, [
- LDAP_MODIFY_BATCH_REMOVE_ALL,
- LDAP_MODIFY_BATCH_REMOVE,
- LDAP_MODIFY_BATCH_REPLACE,
- LDAP_MODIFY_BATCH_ADD,
- ]);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Computer.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Computer.php
deleted file mode 100644
index e00f259a3..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Computer.php
+++ /dev/null
@@ -1,87 +0,0 @@
-getFirstAttribute($this->schema->operatingSystem());
- }
-
- /**
- * Returns the computers operating system version.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679079(v=vs.85).aspx
- *
- * @return string
- */
- public function getOperatingSystemVersion()
- {
- return $this->getFirstAttribute($this->schema->operatingSystemVersion());
- }
-
- /**
- * Returns the computers operating system service pack.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679078(v=vs.85).aspx
- *
- * @return string
- */
- public function getOperatingSystemServicePack()
- {
- return $this->getFirstAttribute($this->schema->operatingSystemServicePack());
- }
-
- /**
- * Returns the computers DNS host name.
- *
- * @return string
- */
- public function getDnsHostName()
- {
- return $this->getFirstAttribute($this->schema->dnsHostName());
- }
-
- /**
- * Returns the computers bad password time.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675243(v=vs.85).aspx
- *
- * @return int
- */
- public function getBadPasswordTime()
- {
- return $this->getFirstAttribute($this->schema->badPasswordTime());
- }
-
- /**
- * Returns the computers account expiry date.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675098(v=vs.85).aspx
- *
- * @return int
- */
- public function getAccountExpiry()
- {
- return $this->getFirstAttribute($this->schema->accountExpires());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasAttributes.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasAttributes.php
deleted file mode 100644
index 2235bbe2d..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasAttributes.php
+++ /dev/null
@@ -1,345 +0,0 @@
-getAttribute($key);
- }
-
- /**
- * Dynamically set attributes on the object.
- *
- * @param mixed $key
- * @param mixed $value
- *
- * @return $this
- */
- public function __set($key, $value)
- {
- return $this->setAttribute($key, $value);
- }
-
- /**
- * Synchronizes the models original attributes
- * with the model's current attributes.
- *
- * @return $this
- */
- public function syncOriginal()
- {
- $this->original = $this->attributes;
-
- return $this;
- }
-
- /**
- * Returns the models attribute with the specified key.
- *
- * If a sub-key is specified, it will try and
- * retrieve it from the parent keys array.
- *
- * @param int|string $key
- * @param int|string $subKey
- *
- * @return mixed
- */
- public function getAttribute($key, $subKey = null)
- {
- if (!$key) {
- return;
- }
-
- // We'll normalize the given key to prevent case sensitivity issues.
- $key = $this->normalizeAttributeKey($key);
-
- if (is_null($subKey) && $this->hasAttribute($key)) {
- return $this->attributes[$key];
- } elseif ($this->hasAttribute($key, $subKey)) {
- return $this->attributes[$key][$subKey];
- }
- }
-
- /**
- * Returns the first attribute by the specified key.
- *
- * @param string $key
- *
- * @return mixed
- */
- public function getFirstAttribute($key)
- {
- return $this->getAttribute($key, 0);
- }
-
- /**
- * Returns all of the models attributes.
- *
- * @return array
- */
- public function getAttributes()
- {
- return $this->attributes;
- }
-
- /**
- * Fills the entry with the supplied attributes.
- *
- * @param array $attributes
- *
- * @return $this
- */
- public function fill(array $attributes = [])
- {
- foreach ($attributes as $key => $value) {
- $this->setAttribute($key, $value);
- }
-
- return $this;
- }
-
- /**
- * Sets an attributes value by the specified key and sub-key.
- *
- * @param int|string $key
- * @param mixed $value
- * @param int|string $subKey
- *
- * @return $this
- */
- public function setAttribute($key, $value, $subKey = null)
- {
- // Normalize key.
- $key = $this->normalizeAttributeKey($key);
-
- // If the key is equal to 'dn', we'll automatically
- // change it to the full attribute name.
- $key = ($key == 'dn' ? $this->schema->distinguishedName() : $key);
-
- if (is_null($subKey)) {
- // We need to ensure all attributes are set as arrays so all
- // of our model methods retrieve attributes correctly.
- $this->attributes[$key] = is_array($value) ? $value : [$value];
- } else {
- $this->attributes[$key][$subKey] = $value;
- }
-
- return $this;
- }
-
- /**
- * Sets the first attributes value by the specified key.
- *
- * @param int|string $key
- * @param mixed $value
- *
- * @return $this
- */
- public function setFirstAttribute($key, $value)
- {
- return $this->setAttribute($key, $value, 0);
- }
-
- /**
- * Sets the attributes property.
- *
- * Used when constructing an existing LDAP record.
- *
- * @param array $attributes
- *
- * @return $this
- */
- public function setRawAttributes(array $attributes = [])
- {
- // We'll filter out those annoying 'count' keys returned with LDAP results,
- // and lowercase all root array keys to prevent any casing issues.
- $this->attributes = array_change_key_case($this->filterRawAttributes($attributes), CASE_LOWER);
-
- // We'll pull out the distinguished name from our raw attributes
- // and set it into our attributes array with the full attribute
- // definition. This allows us to normalize distinguished
- // names across different LDAP variants.
- if ($dn = Arr::get($attributes, 'dn')) {
- // In some LDAP variants, the distinguished
- // name is returned as an array.
- if (is_array($dn)) {
- $dn = Arr::first($dn);
- }
-
- $this->setDistinguishedName($dn);
- }
-
- $this->syncOriginal();
-
- // Set exists to true since raw attributes are only
- // set in the case of attributes being loaded by
- // query results.
- $this->exists = true;
-
- return $this;
- }
-
- /**
- * Filters the count key recursively from raw LDAP attributes.
- *
- * @param array $attributes
- * @param array|string $keys
- *
- * @return array
- */
- public function filterRawAttributes(array $attributes = [], $keys = ['count', 'dn'])
- {
- $attributes = Arr::except($attributes, $keys);
-
- array_walk($attributes, function (&$value) use ($keys) {
- $value = is_array($value) ?
- $this->filterRawAttributes($value, $keys) :
- $value;
- });
-
- return $attributes;
- }
-
- /**
- * Returns true / false if the specified attribute
- * exists in the attributes array.
- *
- * @param int|string $key
- * @param int|string $subKey
- *
- * @return bool
- */
- public function hasAttribute($key, $subKey = null)
- {
- // Normalize key.
- $key = $this->normalizeAttributeKey($key);
-
- if (is_null($subKey)) {
- return Arr::has($this->attributes, $key);
- }
-
- return Arr::has($this->attributes, "$key.$subKey");
- }
-
- /**
- * Returns the number of attributes inside
- * the attributes property.
- *
- * @return int
- */
- public function countAttributes()
- {
- return count($this->getAttributes());
- }
-
- /**
- * Returns the models original attributes.
- *
- * @return array
- */
- public function getOriginal()
- {
- return $this->original;
- }
-
- /**
- * Get the attributes that have been changed since last sync.
- *
- * @return array
- */
- public function getDirty()
- {
- $dirty = [];
-
- foreach ($this->attributes as $key => $value) {
- if (!$this->originalIsEquivalent($key)) {
- // We need to reset the array's indices using array_values due to
- // LDAP requiring consecutive indices (0, 1, 2 etc.)
- $dirty[$key] = array_values($value);
- }
- }
-
- return $dirty;
- }
-
- /**
- * Returns a normalized attribute key.
- *
- * @param string $key
- *
- * @return string
- */
- protected function normalizeAttributeKey($key)
- {
- return strtolower($key);
- }
-
- /**
- * Determine if the new and old values for a given key are equivalent.
- *
- * @param string $key
- *
- * @return bool
- */
- protected function originalIsEquivalent($key)
- {
- if (!array_key_exists($key, $this->original)) {
- return false;
- }
-
- $current = $this->attributes[$key];
-
- $original = $this->original[$key];
-
- if ($current === $original) {
- return true;
- }
-
- return is_numeric($current) &&
- is_numeric($original) &&
- strcmp((string) $current, (string) $original) === 0;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasCriticalSystemObject.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasCriticalSystemObject.php
deleted file mode 100644
index e85cac16a..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasCriticalSystemObject.php
+++ /dev/null
@@ -1,18 +0,0 @@
-getFirstAttribute($this->schema->isCriticalSystemObject());
-
- return $this->convertStringToBool($attribute);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasDescription.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasDescription.php
deleted file mode 100644
index dfc05ed31..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasDescription.php
+++ /dev/null
@@ -1,30 +0,0 @@
-getFirstAttribute($this->schema->description());
- }
-
- /**
- * Sets the models's description.
- *
- * @param string $description
- *
- * @return $this
- */
- public function setDescription($description)
- {
- return $this->setFirstAttribute($this->schema->description(), $description);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasEvents.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasEvents.php
deleted file mode 100644
index 37abb8163..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasEvents.php
+++ /dev/null
@@ -1,21 +0,0 @@
-fire($event);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasLastLogonAndLogOff.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasLastLogonAndLogOff.php
deleted file mode 100644
index 3aee2a5cc..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasLastLogonAndLogOff.php
+++ /dev/null
@@ -1,42 +0,0 @@
-getFirstAttribute($this->schema->lastLogOff());
- }
-
- /**
- * Returns the models's last log on date.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676823(v=vs.85).aspx
- *
- * @return string
- */
- public function getLastLogon()
- {
- return $this->getFirstAttribute($this->schema->lastLogOn());
- }
-
- /**
- * Returns the models's last log on timestamp.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676824(v=vs.85).aspx
- *
- * @return string
- */
- public function getLastLogonTimestamp()
- {
- return $this->getFirstAttribute($this->schema->lastLogOnTimestamp());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasMemberOf.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasMemberOf.php
deleted file mode 100644
index 3c1b85edd..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasMemberOf.php
+++ /dev/null
@@ -1,260 +0,0 @@
-getAttribute($this->schema->memberOf());
-
- // Normalize returned distinguished names if the attribute is null.
- return is_array($dns) ? $dns : [];
- }
-
- /**
- * Adds the current model to the specified group.
- *
- * @param string|Group $group
- *
- * @return bool
- */
- public function addGroup($group)
- {
- if (is_string($group)) {
- // If the group is a string, we'll assume the dev is passing
- // in a DN string of the group. We'll try to locate it.
- $group = $this->query->newInstance()->findByDn($group);
- }
-
- if ($group instanceof Group) {
- // If the group is Group model instance, we can
- // add the current models DN to the group.
- return $group->addMember($this->getDn());
- }
-
- return false;
- }
-
- /**
- * Removes the current model from the specified group.
- *
- * @param string|Group $group
- *
- * @return bool
- */
- public function removeGroup($group)
- {
- if (is_string($group)) {
- // If the group is a string, we'll assume the dev is passing
- // in a DN string of the group. We'll try to locate it.
- $group = $this->query->newInstance()->findByDn($group);
- }
-
- if ($group instanceof Group) {
- // If the group is Group model instance, we can
- // remove the current models DN from the group.
- return $group->removeMember($this->getDn());
- }
-
- return false;
- }
-
- /**
- * Removes the current model from all groups.
- *
- * @return array The group distinguished names that were successfully removed
- */
- public function removeAllGroups()
- {
- $removed = [];
-
- foreach ($this->getMemberOf() as $group) {
- if ($this->removeGroup($group)) {
- $removed[] = $group;
- }
- }
-
- return $removed;
- }
-
- /**
- * Returns the models groups that it is apart of.
- *
- * If a recursive option is given, groups of groups
- * are retrieved and then merged with
- * the resulting collection.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms677099(v=vs.85).aspx
- *
- * @param array $fields
- * @param bool $recursive
- * @param array $visited
- *
- * @return Collection
- */
- public function getGroups(array $fields = ['*'], $recursive = false, array $visited = [])
- {
- if (!in_array($this->schema->memberOf(), $fields)) {
- // We want to make sure that we always select the memberof
- // field in case developers want recursive members.
- $fields = array_merge($fields, [$this->schema->memberOf()]);
- }
-
- $groups = $this->getGroupsByNames($this->getMemberOf(), $fields);
-
- // We need to check if we're working with a User model. Only users
- // contain a primary group. If we are, we'll merge the users
- // primary group into the resulting collection.
- if ($this instanceof User && $primary = $this->getPrimaryGroup()) {
- $groups->push($primary);
- }
-
- // If recursive results are requested, we'll ask each group
- // for their groups, and merge the resulting collection.
- if ($recursive) {
- /** @var Group $group */
- foreach ($groups as $group) {
- // We need to validate that we haven't already queried
- // for this group's members so we don't allow
- // infinite recursion in case of circular
- // group dependencies in LDAP.
- if (!in_array($group->getDn(), $visited)) {
- $visited[] = $group->getDn();
-
- $members = $group->getGroups($fields, $recursive, $visited);
-
- /** @var Group $member */
- foreach ($members as $member) {
- $visited[] = $member->getDn();
- }
-
- $groups = $groups->merge($members);
- }
- }
- }
-
- return $groups;
- }
-
- /**
- * Returns the models groups names in a single dimension array.
- *
- * If a recursive option is given, groups of groups
- * are retrieved and then merged with
- * the resulting collection.
- *
- * @param bool $recursive
- *
- * @return array
- */
- public function getGroupNames($recursive = false)
- {
- $fields = [$this->schema->commonName(), $this->schema->memberOf()];
-
- $names = $this->getGroups($fields, $recursive)->map(function (Group $group) {
- return $group->getCommonName();
- })->toArray();
-
- return array_unique($names);
- }
-
- /**
- * Determine if the current model is a member of the specified group(s).
- *
- * @param mixed $group
- * @param bool $recursive
- *
- * @return bool
- */
- public function inGroup($group, $recursive = false)
- {
- $memberOf = $this->getGroups(['cn'], $recursive);
-
- if ($group instanceof Collection) {
- // If we've been given a collection then we'll convert
- // it to an array to normalize the value.
- $group = $group->toArray();
- }
-
- $groups = is_array($group) ? $group : [$group];
-
- foreach ($groups as $group) {
- // We need to iterate through each given group that the
- // model must be apart of, then go through the models
- // actual groups and perform validation.
- $exists = $memberOf->filter(function (Group $parent) use ($group) {
- return $this->groupIsParent($group, $parent);
- })->count() !== 0;
-
- if (!$exists) {
- // If the current group isn't at all contained
- // in the memberOf collection, we'll
- // return false here.
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Retrieves groups by their distinguished name.
- *
- * @param array $dns
- * @param array $fields
- *
- * @return Collection
- */
- protected function getGroupsByNames(array $dns = [], $fields = [])
- {
- $query = $this->query->newInstance();
-
- return $query->newCollection($dns)->map(function ($dn) use ($query, $fields) {
- return $query->select($fields)->clearFilters()->findByDn($dn);
- })->filter(function ($group) {
- return $group instanceof Group;
- });
- }
-
- /**
- * Validates if the specified group is the given parent instance.
- *
- * @param Group|string $group
- * @param Group $parent
- *
- * @return bool
- */
- protected function groupIsParent($group, Group $parent)
- {
- if ($group instanceof Group) {
- // We've been given a group instance, we'll compare their DNs.
- return $parent->getDn() === $group->getDn();
- }
-
- if (Utilities::explodeDn($group)) {
- // We've been given a DN, we'll compare it to the parents.
- return $parent->getDn() === $group;
- }
-
- if (!empty($group)) {
- // We've been given just a string, we'll
- // compare it to the parents name.
- return $parent->getCommonName() === $group;
- }
-
- return false;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasUserAccountControl.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasUserAccountControl.php
deleted file mode 100644
index 857378b8b..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasUserAccountControl.php
+++ /dev/null
@@ -1,60 +0,0 @@
-getFirstAttribute($this->schema->userAccountControl());
- }
-
- /**
- * Returns the users user account control as an AccountControl object.
- *
- * @return AccountControl
- */
- public function getUserAccountControlObject()
- {
- return new AccountControl($this->getUserAccountControl());
- }
-
- /**
- * Sets the users account control property.
- *
- * @param int|string|AccountControl $accountControl
- *
- * @return $this
- */
- public function setUserAccountControl($accountControl)
- {
- return $this->setAttribute($this->schema->userAccountControl(), (string) $accountControl);
- }
-
- /**
- * Returns if the user is disabled.
- *
- * @return bool
- */
- public function isDisabled()
- {
- return ($this->getUserAccountControl() & AccountControl::ACCOUNTDISABLE) === AccountControl::ACCOUNTDISABLE;
- }
-
- /**
- * Returns if the user is enabled.
- *
- * @return bool
- */
- public function isEnabled()
- {
- return $this->getUserAccountControl() === null ? false : !$this->isDisabled();
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasUserProperties.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasUserProperties.php
deleted file mode 100644
index 0d1c54137..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Concerns/HasUserProperties.php
+++ /dev/null
@@ -1,453 +0,0 @@
-getFirstAttribute($this->schema->country());
- }
-
- /**
- * Sets the users country.
- *
- * @param string $country
- *
- * @return $this
- */
- public function setCountry($country)
- {
- return $this->setFirstAttribute($this->schema->country(), $country);
- }
-
- /**
- * Returns the users department.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675490(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getDepartment()
- {
- return $this->getFirstAttribute($this->schema->department());
- }
-
- /**
- * Sets the users department.
- *
- * @param string $department
- *
- * @return $this
- */
- public function setDepartment($department)
- {
- return $this->setFirstAttribute($this->schema->department(), $department);
- }
-
- /**
- * Returns the users email address.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676855(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getEmail()
- {
- return $this->getFirstAttribute($this->schema->email());
- }
-
- /**
- * Sets the users email.
- *
- * Keep in mind this will remove all other
- * email addresses the user currently has.
- *
- * @param string $email
- *
- * @return $this
- */
- public function setEmail($email)
- {
- return $this->setFirstAttribute($this->schema->email(), $email);
- }
-
- /**
- * Returns the users facsimile number.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675675(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getFacsimileNumber()
- {
- return $this->getFirstAttribute($this->schema->facsimile());
- }
-
- /**
- * Sets the users facsimile number.
- *
- * @param string $number
- *
- * @return $this
- */
- public function setFacsimileNumber($number)
- {
- return $this->setFirstAttribute($this->schema->facsimile(), $number);
- }
-
- /**
- * Returns the users first name.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675719(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getFirstName()
- {
- return $this->getFirstAttribute($this->schema->firstName());
- }
-
- /**
- * Sets the users first name.
- *
- * @param string $firstName
- *
- * @return $this
- */
- public function setFirstName($firstName)
- {
- return $this->setFirstAttribute($this->schema->firstName(), $firstName);
- }
-
- /**
- * Returns the users initials.
- *
- * @return string|null
- */
- public function getInitials()
- {
- return $this->getFirstAttribute($this->schema->initials());
- }
-
- /**
- * Sets the users initials.
- *
- * @param string $initials
- *
- * @return $this
- */
- public function setInitials($initials)
- {
- return $this->setFirstAttribute($this->schema->initials(), $initials);
- }
-
- /**
- * Returns the users IP Phone.
- *
- * @return string|null
- */
- public function getIpPhone()
- {
- return $this->getFirstAttribute($this->schema->ipPhone());
- }
-
- /**
- * Sets the users IP phone.
- *
- * @param string $ip
- *
- * @return $this
- */
- public function setIpPhone($ip)
- {
- return $this->setFirstAttribute($this->schema->ipPhone(), $ip);
- }
-
- /**
- * Returns the users last name.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679872(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getLastName()
- {
- return $this->getFirstAttribute($this->schema->lastName());
- }
-
- /**
- * Sets the users last name.
- *
- * @param string $lastName
- *
- * @return $this
- */
- public function setLastName($lastName)
- {
- return $this->setFirstAttribute($this->schema->lastName(), $lastName);
- }
-
- /**
- * Returns the users postal code.
- *
- * @return string|null
- */
- public function getPostalCode()
- {
- return $this->getFirstAttribute($this->schema->postalCode());
- }
-
- /**
- * Sets the users postal code.
- *
- * @param string $postalCode
- *
- * @return $this
- */
- public function setPostalCode($postalCode)
- {
- return $this->setFirstAttribute($this->schema->postalCode(), $postalCode);
- }
-
- /**
- * Get the users post office box.
- *
- * @return string|null
- */
- public function getPostOfficeBox()
- {
- return $this->getFirstAttribute($this->schema->postOfficeBox());
- }
-
- /**
- * Sets the users post office box.
- *
- * @param string|int $box
- *
- * @return $this
- */
- public function setPostOfficeBox($box)
- {
- return $this->setFirstAttribute($this->schema->postOfficeBox(), $box);
- }
-
- /**
- * Sets the users proxy addresses.
- *
- * This will remove all proxy addresses on the user and insert the specified addresses.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679424(v=vs.85).aspx
- *
- * @param array $addresses
- *
- * @return $this
- */
- public function setProxyAddresses(array $addresses = [])
- {
- return $this->setAttribute($this->schema->proxyAddresses(), $addresses);
- }
-
- /**
- * Add's a single proxy address to the user.
- *
- * @param string $address
- *
- * @return $this
- */
- public function addProxyAddress($address)
- {
- $addresses = $this->getProxyAddresses();
-
- $addresses[] = $address;
-
- return $this->setAttribute($this->schema->proxyAddresses(), $addresses);
- }
-
- /**
- * Returns the users proxy addresses.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679424(v=vs.85).aspx
- *
- * @return array
- */
- public function getProxyAddresses()
- {
- return $this->getAttribute($this->schema->proxyAddresses()) ?? [];
- }
-
- /**
- * Returns the users street address.
- *
- * @return string|null
- */
- public function getStreetAddress()
- {
- return $this->getFirstAttribute($this->schema->streetAddress());
- }
-
- /**
- * Sets the users street address.
- *
- * @param string $address
- *
- * @return $this
- */
- public function setStreetAddress($address)
- {
- return $this->setFirstAttribute($this->schema->streetAddress(), $address);
- }
-
- /**
- * Returns the users title.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms680037(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getTitle()
- {
- return $this->getFirstAttribute($this->schema->title());
- }
-
- /**
- * Sets the users title.
- *
- * @param string $title
- *
- * @return $this
- */
- public function setTitle($title)
- {
- return $this->setFirstAttribute($this->schema->title(), $title);
- }
-
- /**
- * Returns the users telephone number.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms680027(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getTelephoneNumber()
- {
- return $this->getFirstAttribute($this->schema->telephone());
- }
-
- /**
- * Sets the users telephone number.
- *
- * @param string $number
- *
- * @return $this
- */
- public function setTelephoneNumber($number)
- {
- return $this->setFirstAttribute($this->schema->telephone(), $number);
- }
-
- /**
- * Returns the users primary mobile phone number.
- *
- * @return string|null
- */
- public function getMobileNumber()
- {
- return $this->getFirstAttribute($this->schema->mobile());
- }
-
- /**
- * Sets the users primary mobile phone number.
- *
- * @param string $number
- *
- * @return $this
- */
- public function setMobileNumber($number)
- {
- return $this->setFirstAttribute($this->schema->mobile(), $number);
- }
-
- /**
- * Returns the users secondary (other) mobile phone number.
- *
- * @return string|null
- */
- public function getOtherMobileNumber()
- {
- return $this->getFirstAttribute($this->schema->otherMobile());
- }
-
- /**
- * Sets the users secondary (other) mobile phone number.
- *
- * @param string $number
- *
- * @return $this
- */
- public function setOtherMobileNumber($number)
- {
- return $this->setFirstAttribute($this->schema->otherMobile(), $number);
- }
-
- /**
- * Returns the users other mailbox attribute.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679091(v=vs.85).aspx
- *
- * @return array
- */
- public function getOtherMailbox()
- {
- return $this->getAttribute($this->schema->otherMailbox());
- }
-
- /**
- * Sets the users other mailboxes.
- *
- * @param array $otherMailbox
- *
- * @return $this
- */
- public function setOtherMailbox($otherMailbox = [])
- {
- return $this->setAttribute($this->schema->otherMailbox(), $otherMailbox);
- }
-
- /**
- * Returns the distinguished name of the user who is the user's manager.
- *
- * @return string|null
- */
- public function getManager()
- {
- return $this->getFirstAttribute($this->schema->manager());
- }
-
- /**
- * Sets the distinguished name of the user who is the user's manager.
- *
- * @param string $managerDn
- *
- * @return $this
- */
- public function setManager($managerDn)
- {
- return $this->setFirstAttribute($this->schema->manager(), $managerDn);
- }
-
- /**
- * Returns the users mail nickname.
- *
- * @return string|null
- */
- public function getMailNickname()
- {
- return $this->getFirstAttribute($this->schema->emailNickname());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Contact.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Contact.php
deleted file mode 100644
index 517a35be1..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Contact.php
+++ /dev/null
@@ -1,14 +0,0 @@
-getFirstAttribute($this->schema->systemFlags());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Entry.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Entry.php
deleted file mode 100644
index be6ef1d90..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Entry.php
+++ /dev/null
@@ -1,13 +0,0 @@
-model = $model;
- }
-
- /**
- * Returns the model that generated the event.
- *
- * @return Model
- */
- public function getModel()
- {
- return $this->model;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Events/Saved.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Events/Saved.php
deleted file mode 100644
index f775e2e5c..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Events/Saved.php
+++ /dev/null
@@ -1,8 +0,0 @@
-setQuery($builder)
- ->setSchema($builder->getSchema());
- }
-
- /**
- * Sets the current query builder.
- *
- * @param Builder $builder
- *
- * @return $this
- */
- public function setQuery(Builder $builder)
- {
- $this->query = $builder;
-
- return $this;
- }
-
- /**
- * Sets the current schema.
- *
- * If null is given, a default ActiveDirectory schema is set.
- *
- * @param SchemaInterface|null $schema
- *
- * @return $this
- */
- public function setSchema(SchemaInterface $schema = null)
- {
- $this->schema = $schema ?: new ActiveDirectory();
-
- return $this;
- }
-
- /**
- * Creates a new generic LDAP entry instance.
- *
- * @param array $attributes
- *
- * @return Entry
- */
- public function entry(array $attributes = [])
- {
- $model = $this->schema->entryModel();
-
- return new $model($attributes, $this->query);
- }
-
- /**
- * Creates a new user instance.
- *
- * @param array $attributes
- *
- * @return User
- */
- public function user(array $attributes = [])
- {
- $model = $this->schema->userModel();
-
- return (new $model($attributes, $this->query))
- ->setAttribute($this->schema->objectClass(), $this->schema->userObjectClasses());
- }
-
- /**
- * Creates a new organizational unit instance.
- *
- * @param array $attributes
- *
- * @return OrganizationalUnit
- */
- public function ou(array $attributes = [])
- {
- $model = $this->schema->organizationalUnitModel();
-
- return (new $model($attributes, $this->query))
- ->setAttribute($this->schema->objectClass(), [
- $this->schema->top(),
- $this->schema->organizationalUnit(),
- ]);
- }
-
- /**
- * Creates a new organizational unit instance.
- *
- * @param array $attributes
- *
- * @return Organization
- */
- public function organization(array $attributes = [])
- {
- $model = $this->schema->organizationModel();
-
- return (new $model($attributes, $this->query))
- ->setAttribute($this->schema->objectClass(), [
- $this->schema->top(),
- $this->schema->organization(),
- ]);
- }
-
- /**
- * Creates a new group instance.
- *
- * @param array $attributes
- *
- * @return Group
- */
- public function group(array $attributes = [])
- {
- $model = $this->schema->groupModel();
-
- return (new $model($attributes, $this->query))
- ->setAttribute($this->schema->objectClass(), [
- $this->schema->top(),
- $this->schema->objectCategoryGroup(),
- ]);
- }
-
- /**
- * Creates a new organizational unit instance.
- *
- * @param array $attributes
- *
- * @return Container
- */
- public function container(array $attributes = [])
- {
- $model = $this->schema->containerModel();
-
- return (new $model($attributes, $this->query))
- ->setAttribute($this->schema->objectClass(), $this->schema->objectClassContainer());
- }
-
- /**
- * Creates a new user instance as a contact.
- *
- * @param array $attributes
- *
- * @return User
- */
- public function contact(array $attributes = [])
- {
- $model = $this->schema->contactModel();
-
- return (new $model($attributes, $this->query))
- ->setAttribute($this->schema->objectClass(), [
- $this->schema->top(),
- $this->schema->person(),
- $this->schema->organizationalPerson(),
- $this->schema->contact(),
- ]);
- }
-
- /**
- * Creates a new computer instance.
- *
- * @param array $attributes
- *
- * @return Computer
- */
- public function computer(array $attributes = [])
- {
- $model = $this->schema->computerModel();
-
- return (new $model($attributes, $this->query))
- ->setAttribute($this->schema->objectClass(), [
- $this->schema->top(),
- $this->schema->person(),
- $this->schema->organizationalPerson(),
- $this->schema->user(),
- $this->schema->computer(),
- ]);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ForeignSecurityPrincipal.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ForeignSecurityPrincipal.php
deleted file mode 100644
index b0d15d8f7..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ForeignSecurityPrincipal.php
+++ /dev/null
@@ -1,13 +0,0 @@
-getMembersFromAttribute($this->schema->member());
-
- if (count($members) === 0) {
- $members = $this->getPaginatedMembers();
- }
-
- return $this->newCollection($members);
- }
-
- /**
- * Returns the group's member names only.
- *
- * @return array
- */
- public function getMemberNames()
- {
- $members = [];
-
- $dns = $this->getAttribute($this->schema->member()) ?: [];
-
- foreach ($dns as $dn) {
- $exploded = Utilities::explodeDn($dn);
-
- if (array_key_exists(0, $exploded)) {
- $members[] = $exploded[0];
- }
- }
-
- return $members;
- }
-
- /**
- * Sets the groups members using an array of user DNs.
- *
- * @param array $entries
- *
- * @return $this
- */
- public function setMembers(array $entries)
- {
- return $this->setAttribute($this->schema->member(), $entries);
- }
-
- /**
- * Adds multiple entries to the current group.
- *
- * @param array $members
- *
- * @return bool
- */
- public function addMembers(array $members)
- {
- $members = array_map(function ($member) {
- return $member instanceof Model
- ? $member->getDn()
- : $member;
- }, $members);
-
- $mod = $this->newBatchModification(
- $this->schema->member(),
- LDAP_MODIFY_BATCH_ADD,
- $members
- );
-
- return $this->addModification($mod)->save();
- }
-
- /**
- * Adds an entry to the current group.
- *
- * @param string|Entry $member
- *
- * @throws InvalidArgumentException When the given entry is empty or contains no distinguished name.
- *
- * @return bool
- */
- public function addMember($member)
- {
- $member = ($member instanceof Model ? $member->getDn() : $member);
-
- if (is_null($member)) {
- throw new InvalidArgumentException(
- 'Cannot add member to group. The members distinguished name cannot be null.'
- );
- }
-
- $mod = $this->newBatchModification(
- $this->schema->member(),
- LDAP_MODIFY_BATCH_ADD,
- [$member]
- );
-
- return $this->addModification($mod)->save();
- }
-
- /**
- * Removes an entry from the current group.
- *
- * @param string|Entry $member
- *
- * @throws InvalidArgumentException
- *
- * @return bool
- */
- public function removeMember($member)
- {
- $member = ($member instanceof Model ? $member->getDn() : $member);
-
- if (is_null($member)) {
- throw new InvalidArgumentException(
- 'Cannot remove member to group. The members distinguished name cannot be null.'
- );
- }
-
- $mod = $this->newBatchModification(
- $this->schema->member(),
- LDAP_MODIFY_BATCH_REMOVE,
- [$member]
- );
-
- return $this->addModification($mod)->save();
- }
-
- /**
- * Removes all members from the current group.
- *
- * @return bool
- */
- public function removeMembers()
- {
- $mod = $this->newBatchModification(
- $this->schema->member(),
- LDAP_MODIFY_BATCH_REMOVE_ALL
- );
-
- return $this->addModification($mod)->save();
- }
-
- /**
- * Returns the group type integer.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675935(v=vs.85).aspx
- *
- * @return string
- */
- public function getGroupType()
- {
- return $this->getFirstAttribute($this->schema->groupType());
- }
-
- /**
- * Retrieves group members by the specified model attribute.
- *
- * @param $attribute
- *
- * @return array
- */
- protected function getMembersFromAttribute($attribute)
- {
- $members = [];
-
- $entries = $this->getAttribute($attribute) ?: [];
-
- $query = $this->query->newInstance();
-
- // Retrieving the member identifier to allow
- // compatibility with LDAP variants.
- $identifier = $this->schema->memberIdentifier();
-
- foreach ($entries as $entry) {
- // If our identifier is a distinguished name, then we need to
- // use an alternate query method, as we can't locate records
- // by distinguished names using an LDAP filter.
- if ($identifier == 'dn' || $identifier == 'distinguishedname') {
- $member = $query->findByDn($entry);
- } else {
- // We'll ensure we clear our filters when retrieving each member,
- // so we can continue fetching the next one in line.
- $member = $query->clearFilters()->findBy($identifier, $entry);
- }
-
- // We'll double check that we've received a model from
- // our query before adding it into our results.
- if ($member instanceof Model) {
- $members[] = $member;
- }
- }
-
- return $members;
- }
-
- /**
- * Retrieves members that are contained in a member range.
- *
- * @return array
- */
- protected function getPaginatedMembers()
- {
- $members = [];
-
- $keys = array_keys($this->attributes);
-
- // We need to filter out the model attributes so
- // we only retrieve the member range.
- $attributes = array_values(array_filter($keys, function ($key) {
- return strpos($key, 'member;range') !== false;
- }));
-
- // We'll grab the member range key so we can run a
- // regex on it to determine the range.
- $key = reset($attributes);
-
- preg_match_all(
- '/member;range\=([0-9]{1,4})-([0-9*]{1,4})/',
- $key,
- $matches
- );
-
- if ($key && count($matches) == 3) {
- // Retrieve the ending range number.
- $to = $matches[2][0];
-
- // Retrieve the current groups members from the
- // current range string (ex. 'member;0-50').
- $members = $this->getMembersFromAttribute($key);
-
- // If the query already included all member results (indicated
- // by the '*'), then we can return here. Otherwise we need
- // to continue on and retrieve the rest.
- if ($to === '*') {
- return $members;
- }
-
- // Determine the amount of members we're requesting per query.
- $range = $to - $matches[1][0];
-
- // Set our starting range to our last end range plus one.
- $from = $to + 1;
-
- // We'll determine the new end range by adding the
- // total range to our new starting range.
- $to = $from + $range;
-
- // We'll need to query for the current model again but with
- // a new range to retrieve the other members.
- /** @var Group $group */
- $group = $this->query->newInstance()->findByDn(
- $this->getDn(),
- [$this->query->getSchema()->memberRange($from, $to)]
- );
-
- // Finally, we'll merge our current members
- // with the newly returned members.
- $members = array_merge(
- $members,
- $group->getMembers()->toArray()
- );
- }
-
- return $members;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Model.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Model.php
deleted file mode 100644
index 3bad2ea39..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Model.php
+++ /dev/null
@@ -1,1266 +0,0 @@
-setQuery($builder)
- ->setSchema($builder->getSchema())
- ->fill($attributes);
- }
-
- /**
- * Returns the models distinguished name when the model is converted to a string.
- *
- * @return null|string
- */
- public function __toString()
- {
- return $this->getDn();
- }
-
- /**
- * Sets the current query builder.
- *
- * @param Builder $builder
- *
- * @return $this
- */
- public function setQuery(Builder $builder)
- {
- $this->query = $builder;
-
- return $this;
- }
-
- /**
- * Returns the current query builder.
- *
- * @return Builder
- */
- public function getQuery()
- {
- return $this->query;
- }
-
- /**
- * Returns a new query builder instance.
- *
- * @return Builder
- */
- public function newQuery()
- {
- return $this->query->newInstance();
- }
-
- /**
- * Returns a new batch modification.
- *
- * @param string|null $attribute
- * @param string|int|null $type
- * @param array $values
- *
- * @return BatchModification
- */
- public function newBatchModification($attribute = null, $type = null, $values = [])
- {
- return new BatchModification($attribute, $type, $values);
- }
-
- /**
- * Returns a new collection with the specified items.
- *
- * @param mixed $items
- *
- * @return Collection
- */
- public function newCollection($items = [])
- {
- return new Collection($items);
- }
-
- /**
- * Sets the current model schema.
- *
- * @param SchemaInterface $schema
- *
- * @return $this
- */
- public function setSchema(SchemaInterface $schema)
- {
- $this->schema = $schema;
-
- return $this;
- }
-
- /**
- * Returns the current model schema.
- *
- * @return SchemaInterface
- */
- public function getSchema()
- {
- return $this->schema;
- }
-
- /**
- * Determine if the given offset exists.
- *
- * @param string $offset
- *
- * @return bool
- */
- public function offsetExists($offset)
- {
- return !is_null($this->getAttribute($offset));
- }
-
- /**
- * Get the value for a given offset.
- *
- * @param string $offset
- *
- * @return mixed
- */
- public function offsetGet($offset)
- {
- return $this->getAttribute($offset);
- }
-
- /**
- * Set the value at the given offset.
- *
- * @param string $offset
- * @param mixed $value
- *
- * @return void
- */
- public function offsetSet($offset, $value)
- {
- $this->setAttribute($offset, $value);
- }
-
- /**
- * Unset the value at the given offset.
- *
- * @param string $offset
- *
- * @return void
- */
- public function offsetUnset($offset)
- {
- unset($this->attributes[$offset]);
- }
-
- /**
- * Determine if an attribute exists on the model.
- *
- * @param string $key
- *
- * @return bool
- */
- public function __isset($key)
- {
- return $this->offsetExists($key);
- }
-
- /**
- * Convert the object into something JSON serializable.
- *
- * @return array
- */
- public function jsonSerialize()
- {
- $attributes = $this->getAttributes();
-
- array_walk_recursive($attributes, function (&$val) {
- if (MbString::isLoaded()) {
- // If we're able to detect the attribute
- // encoding, we'll encode only the
- // attributes that need to be.
- if (!MbString::isUtf8($val)) {
- $val = utf8_encode($val);
- }
- } else {
- // If the mbstring extension is not loaded, we'll
- // encode all attributes to make sure
- // they are encoded properly.
- $val = utf8_encode($val);
- }
- });
-
- // We'll replace the binary GUID and SID with
- // their string equivalents for convenience.
- return array_replace($attributes, [
- $this->schema->objectGuid() => $this->getConvertedGuid(),
- $this->schema->objectSid() => $this->getConvertedSid(),
- ]);
- }
-
- /**
- * Reload a fresh model instance from the directory.
- *
- * @return static|null
- */
- public function fresh()
- {
- $model = $this->query->newInstance()->findByDn($this->getDn());
-
- return $model instanceof self ? $model : null;
- }
-
- /**
- * Synchronizes the current models attributes with the directory values.
- *
- * @return bool
- */
- public function syncRaw()
- {
- if ($model = $this->fresh()) {
- $this->setRawAttributes($model->getAttributes());
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Returns the models batch modifications to be processed.
- *
- * @return array
- */
- public function getModifications()
- {
- $this->buildModificationsFromDirty();
-
- return $this->modifications;
- }
-
- /**
- * Sets the models modifications array.
- *
- * @param array $modifications
- *
- * @return $this
- */
- public function setModifications(array $modifications = [])
- {
- $this->modifications = $modifications;
-
- return $this;
- }
-
- /**
- * Adds a batch modification to the models modifications array.
- *
- * @param array|BatchModification $mod
- *
- * @throws InvalidArgumentException
- *
- * @return $this
- */
- public function addModification($mod = [])
- {
- if ($mod instanceof BatchModification) {
- $mod = $mod->get();
- }
-
- if ($this->isValidModification($mod)) {
- $this->modifications[] = $mod;
-
- return $this;
- }
-
- throw new InvalidArgumentException(
- "The batch modification array does not include the mandatory 'attrib' or 'modtype' keys."
- );
- }
-
- /**
- * Returns the model's distinguished name string.
- *
- * @link https://msdn.microsoft.com/en-us/library/aa366101(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getDistinguishedName()
- {
- return $this->getFirstAttribute($this->schema->distinguishedName());
- }
-
- /**
- * Sets the model's distinguished name attribute.
- *
- * @param string|DistinguishedName $dn
- *
- * @return $this
- */
- public function setDistinguishedName($dn)
- {
- $this->setFirstAttribute($this->schema->distinguishedName(), (string) $dn);
-
- return $this;
- }
-
- /**
- * Returns the model's distinguished name string.
- *
- * (Alias for getDistinguishedName())
- *
- * @link https://msdn.microsoft.com/en-us/library/aa366101(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getDn()
- {
- return $this->getDistinguishedName();
- }
-
- /**
- * Returns a DistinguishedName object for modifying the current models DN.
- *
- * @return DistinguishedName
- */
- public function getDnBuilder()
- {
- // If we currently don't have a distinguished name, we'll set
- // it to our base, otherwise we'll use our query's base DN.
- $dn = $this->getDistinguishedName() ?: $this->query->getDn();
-
- return $this->getNewDnBuilder($dn);
- }
-
- /**
- * Returns the models distinguished name components.
- *
- * @param bool $removeAttributePrefixes
- *
- * @return array
- */
- public function getDnComponents($removeAttributePrefixes = true)
- {
- if ($components = Utilities::explodeDn($this->getDn(), $removeAttributePrefixes)) {
- unset($components['count']);
-
- return $components;
- }
-
- return [];
- }
-
- /**
- * Returns the distinguished name that the model is a leaf of.
- *
- * @return string
- */
- public function getDnRoot()
- {
- $components = $this->getDnComponents(false);
-
- // Shift off the beginning of the array;
- // This contains the models RDN.
- array_shift($components);
-
- return implode(',', $components);
- }
-
- /**
- * Returns a new DistinguishedName object for building onto.
- *
- * @param string $baseDn
- *
- * @return DistinguishedName
- */
- public function getNewDnBuilder($baseDn = '')
- {
- return new DistinguishedName($baseDn);
- }
-
- /**
- * Sets the model's distinguished name attribute.
- *
- * (Alias for setDistinguishedName())
- *
- * @param string $dn
- *
- * @return $this
- */
- public function setDn($dn)
- {
- return $this->setDistinguishedName($dn);
- }
-
- /**
- * Returns the model's hex object SID.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679024(v=vs.85).aspx
- *
- * @return string
- */
- public function getObjectSid()
- {
- return $this->getFirstAttribute($this->schema->objectSid());
- }
-
- /**
- * Returns the model's binary object GUID.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679021(v=vs.85).aspx
- *
- * @return string
- */
- public function getObjectGuid()
- {
- return $this->getFirstAttribute($this->schema->objectGuid());
- }
-
- /**
- * Returns the model's GUID.
- *
- * @return string|null
- */
- public function getConvertedGuid()
- {
- try {
- return (string) new Guid($this->getObjectGuid());
- } catch (InvalidArgumentException $e) {
- return;
- }
- }
-
- /**
- * Returns the model's SID.
- *
- * @return string|null
- */
- public function getConvertedSid()
- {
- try {
- return (string) new Sid($this->getObjectSid());
- } catch (InvalidArgumentException $e) {
- return;
- }
- }
-
- /**
- * Returns the model's common name.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675449(v=vs.85).aspx
- *
- * @return string
- */
- public function getCommonName()
- {
- return $this->getFirstAttribute($this->schema->commonName());
- }
-
- /**
- * Sets the model's common name.
- *
- * @param string $name
- *
- * @return $this
- */
- public function setCommonName($name)
- {
- return $this->setFirstAttribute($this->schema->commonName(), $name);
- }
-
- /**
- * Returns the model's name. An LDAP alias for the CN attribute.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675449(v=vs.85).aspx
- *
- * @return string
- */
- public function getName()
- {
- return $this->getFirstAttribute($this->schema->name());
- }
-
- /**
- * Sets the model's name.
- *
- * @param string $name
- *
- * @return Model
- */
- public function setName($name)
- {
- return $this->setFirstAttribute($this->schema->name(), $name);
- }
-
- /**
- * Returns the model's display name.
- *
- * @return string
- */
- public function getDisplayName()
- {
- return $this->getFirstAttribute($this->schema->displayName());
- }
-
- /**
- * Sets the model's display name.
- *
- * @param string $displayName
- *
- * @return $this
- */
- public function setDisplayName($displayName)
- {
- return $this->setFirstAttribute($this->schema->displayName(), $displayName);
- }
-
- /**
- * Returns the model's samaccountname.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679635(v=vs.85).aspx
- *
- * @return string
- */
- public function getAccountName()
- {
- return $this->getFirstAttribute($this->schema->accountName());
- }
-
- /**
- * Sets the model's samaccountname.
- *
- * @param string $accountName
- *
- * @return Model
- */
- public function setAccountName($accountName)
- {
- return $this->setFirstAttribute($this->schema->accountName(), $accountName);
- }
-
- /**
- * Returns the model's userPrincipalName.
- *
- * @link https://docs.microsoft.com/en-us/windows/win32/adschema/a-userprincipalname
- *
- * @return string
- */
- public function getUserPrincipalName()
- {
- return $this->getFirstAttribute($this->schema->userPrincipalName());
- }
-
- /**
- * Sets the model's userPrincipalName.
- *
- * @param string $upn
- *
- * @return Model
- */
- public function setUserPrincipalName($upn)
- {
- return $this->setFirstAttribute($this->schema->userPrincipalName(), $upn);
- }
-
- /**
- * Returns the model's samaccounttype.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679637(v=vs.85).aspx
- *
- * @return string
- */
- public function getAccountType()
- {
- return $this->getFirstAttribute($this->schema->accountType());
- }
-
- /**
- * Returns the model's `whenCreated` time.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms680924(v=vs.85).aspx
- *
- * @return string
- */
- public function getCreatedAt()
- {
- return $this->getFirstAttribute($this->schema->createdAt());
- }
-
- /**
- * Returns the created at time in a mysql formatted date.
- *
- * @return string
- */
- public function getCreatedAtDate()
- {
- return (new DateTime())->setTimestamp($this->getCreatedAtTimestamp())->format($this->dateFormat);
- }
-
- /**
- * Returns the created at time in a unix timestamp format.
- *
- * @return float
- */
- public function getCreatedAtTimestamp()
- {
- return DateTime::createFromFormat($this->timestampFormat, $this->getCreatedAt())->getTimestamp();
- }
-
- /**
- * Returns the model's `whenChanged` time.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms680921(v=vs.85).aspx
- *
- * @return string
- */
- public function getUpdatedAt()
- {
- return $this->getFirstAttribute($this->schema->updatedAt());
- }
-
- /**
- * Returns the updated at time in a mysql formatted date.
- *
- * @return string
- */
- public function getUpdatedAtDate()
- {
- return (new DateTime())->setTimestamp($this->getUpdatedAtTimestamp())->format($this->dateFormat);
- }
-
- /**
- * Returns the updated at time in a unix timestamp format.
- *
- * @return float
- */
- public function getUpdatedAtTimestamp()
- {
- return DateTime::createFromFormat($this->timestampFormat, $this->getUpdatedAt())->getTimestamp();
- }
-
- /**
- * Returns the Container of the current Model.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679012(v=vs.85).aspx
- *
- * @return Container|Entry|bool
- */
- public function getObjectClass()
- {
- return $this->query->findByDn($this->getObjectCategoryDn());
- }
-
- /**
- * Returns the CN of the model's object category.
- *
- * @return null|string
- */
- public function getObjectCategory()
- {
- $category = $this->getObjectCategoryArray();
-
- if (is_array($category) && array_key_exists(0, $category)) {
- return $category[0];
- }
- }
-
- /**
- * Returns the model's object category DN in an exploded array.
- *
- * @return array|false
- */
- public function getObjectCategoryArray()
- {
- return Utilities::explodeDn($this->getObjectCategoryDn());
- }
-
- /**
- * Returns the model's object category DN string.
- *
- * @return null|string
- */
- public function getObjectCategoryDn()
- {
- return $this->getFirstAttribute($this->schema->objectCategory());
- }
-
- /**
- * Returns the model's primary group ID.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679375(v=vs.85).aspx
- *
- * @return string
- */
- public function getPrimaryGroupId()
- {
- return $this->getFirstAttribute($this->schema->primaryGroupId());
- }
-
- /**
- * Returns the model's instance type.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676204(v=vs.85).aspx
- *
- * @return int
- */
- public function getInstanceType()
- {
- return $this->getFirstAttribute($this->schema->instanceType());
- }
-
- /**
- * Returns the distinguished name of the user who is assigned to manage this object.
- *
- * @return string|null
- */
- public function getManagedBy()
- {
- return $this->getFirstAttribute($this->schema->managedBy());
- }
-
- /**
- * Returns the user model of the user who is assigned to manage this object.
- *
- * Returns false otherwise.
- *
- * @return User|bool
- */
- public function getManagedByUser()
- {
- if ($dn = $this->getManagedBy()) {
- return $this->query->newInstance()->findByDn($dn);
- }
-
- return false;
- }
-
- /**
- * Sets the user who is assigned to managed this object.
- *
- * @param Model|string $dn
- *
- * @return $this
- */
- public function setManagedBy($dn)
- {
- if ($dn instanceof self) {
- $dn = $dn->getDn();
- }
-
- return $this->setFirstAttribute($this->schema->managedBy(), $dn);
- }
-
- /**
- * Returns the model's max password age.
- *
- * @return string
- */
- public function getMaxPasswordAge()
- {
- return $this->getFirstAttribute($this->schema->maxPasswordAge());
- }
-
- /**
- * Returns the model's max password age in days.
- *
- * @return int
- */
- public function getMaxPasswordAgeDays()
- {
- $age = $this->getMaxPasswordAge();
-
- return (int) (abs($age) / 10000000 / 60 / 60 / 24);
- }
-
- /**
- * Determine if the current model is located inside the given OU.
- *
- * If a model instance is given, the strict parameter is ignored.
- *
- * @param Model|string $ou The organizational unit to check.
- * @param bool $strict Whether the check is case-sensitive.
- *
- * @return bool
- */
- public function inOu($ou, $strict = false)
- {
- if ($ou instanceof self) {
- // If we've been given an OU model, we can
- // just check if the OU's DN is inside
- // the current models DN.
- return (bool) strpos($this->getDn(), $ou->getDn());
- }
-
- $suffix = $strict ? '' : 'i';
-
- return (bool) preg_grep("/{$ou}/{$suffix}", $this->getDnBuilder()->getComponents('ou'));
- }
-
- /**
- * Returns true / false if the current model is writable
- * by checking its instance type integer.
- *
- * @return bool
- */
- public function isWritable()
- {
- return (int) $this->getInstanceType() === 4;
- }
-
- /**
- * Saves the changes to LDAP and returns the results.
- *
- * @param array $attributes The attributes to update or create for the current entry.
- *
- * @return bool
- */
- public function save(array $attributes = [])
- {
- $this->fireModelEvent(new Events\Saving($this));
-
- $saved = $this->exists ? $this->update($attributes) : $this->create($attributes);
-
- if ($saved) {
- $this->fireModelEvent(new Events\Saved($this));
- }
-
- return $saved;
- }
-
- /**
- * Updates the model.
- *
- * @param array $attributes The attributes to update for the current entry.
- *
- * @return bool
- */
- public function update(array $attributes = [])
- {
- $this->fill($attributes);
-
- $modifications = $this->getModifications();
-
- if (count($modifications) > 0) {
- $this->fireModelEvent(new Events\Updating($this));
-
- // Push the update.
- if ($this->query->getConnection()->modifyBatch($this->getDn(), $modifications)) {
- // Re-sync attributes.
- $this->syncRaw();
-
- $this->fireModelEvent(new Events\Updated($this));
-
- // Re-set the models modifications.
- $this->modifications = [];
-
- return true;
- }
-
- // Modification failed, return false.
- return false;
- }
-
- // We need to return true here because modify batch will
- // return false if no modifications are made
- // but this may not always be the case.
- return true;
- }
-
- /**
- * Creates the entry in LDAP.
- *
- * @param array $attributes The attributes for the new entry.
- *
- * @throws UnexpectedValueException
- *
- * @return bool
- */
- public function create(array $attributes = [])
- {
- $this->fill($attributes);
-
- if (empty($this->getDn())) {
- // If the model doesn't currently have a distinguished
- // name set, we'll create one automatically using
- // the current query builders base DN.
- $dn = $this->getCreatableDn();
-
- // If the dn we receive is the same as our queries base DN, we need
- // to throw an exception. The LDAP object must have a valid RDN.
- if ($dn->get() == $this->query->getDn()) {
- throw new UnexpectedValueException("An LDAP object must have a valid RDN to be created. '$dn' given.");
- }
-
- $this->setDn($dn);
- }
-
- $this->fireModelEvent(new Events\Creating($this));
-
- // Create the entry.
- $created = $this->query->getConnection()->add($this->getDn(), $this->getCreatableAttributes());
-
- if ($created) {
- // If the entry was created we'll re-sync
- // the models attributes from the server.
- $this->syncRaw();
-
- $this->fireModelEvent(new Events\Created($this));
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Creates an attribute on the current model.
- *
- * @param string $attribute The attribute to create
- * @param mixed $value The value of the new attribute
- * @param bool $sync Whether to re-sync all attributes
- *
- * @return bool
- */
- public function createAttribute($attribute, $value, $sync = true)
- {
- if (
- $this->exists &&
- $this->query->getConnection()->modAdd($this->getDn(), [$attribute => $value])
- ) {
- if ($sync) {
- $this->syncRaw();
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Updates the specified attribute with the specified value.
- *
- * @param string $attribute The attribute to modify
- * @param mixed $value The new value for the attribute
- * @param bool $sync Whether to re-sync all attributes
- *
- * @return bool
- */
- public function updateAttribute($attribute, $value, $sync = true)
- {
- if (
- $this->exists &&
- $this->query->getConnection()->modReplace($this->getDn(), [$attribute => $value])
- ) {
- if ($sync) {
- $this->syncRaw();
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Deletes an attribute on the current entry.
- *
- * @param string|array $attributes The attribute(s) to delete
- * @param bool $sync Whether to re-sync all attributes
- *
- * Delete specific values in attributes:
- *
- * ["memberuid" => "username"]
- *
- * Delete an entire attribute:
- *
- * ["memberuid" => []]
- *
- * @return bool
- */
- public function deleteAttribute($attributes, $sync = true)
- {
- // If we've been given a string, we'll assume we're removing a
- // single attribute. Otherwise, we'll assume it's
- // an array of attributes to remove.
- $attributes = is_string($attributes) ? [$attributes => []] : $attributes;
-
- if (
- $this->exists &&
- $this->query->getConnection()->modDelete($this->getDn(), $attributes)
- ) {
- if ($sync) {
- $this->syncRaw();
- }
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Deletes the current entry.
- *
- * Throws a ModelNotFoundException if the current model does
- * not exist or does not contain a distinguished name.
- *
- * @param bool $recursive Whether to recursively delete leaf nodes (models that are children).
- *
- * @throws ModelDoesNotExistException
- *
- * @return bool
- */
- public function delete($recursive = false)
- {
- $dn = $this->getDn();
-
- if ($this->exists === false || empty($dn)) {
- // Make sure the record exists before we can delete it.
- // Otherwise, we'll throw an exception.
- throw (new ModelDoesNotExistException())->setModel(get_class($this));
- }
-
- $this->fireModelEvent(new Events\Deleting($this));
-
- if ($recursive) {
- // If recursive is requested, we'll retrieve all direct leaf nodes
- // by executing a 'listing' and delete each resulting model.
- $this->newQuery()->listing()->in($this->getDn())->get()->each(function (self $model) use ($recursive) {
- $model->delete($recursive);
- });
- }
-
- if ($this->query->getConnection()->delete($dn)) {
- // If the deletion was successful, we'll mark the model
- // as non-existing and fire the deleted event.
- $this->exists = false;
-
- $this->fireModelEvent(new Events\Deleted($this));
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Moves the current model into the given new parent.
- *
- * For example: $user->move($ou);
- *
- * @param Model|string $newParentDn The new parent of the current model.
- * @param bool $deleteOldRdn Whether to delete the old models relative distinguished name once renamed / moved.
- *
- * @return bool
- */
- public function move($newParentDn, $deleteOldRdn = true)
- {
- // First we'll explode the current models distinguished name and keep their attributes prefixes.
- $parts = Utilities::explodeDn($this->getDn(), $removeAttrPrefixes = false);
-
- // If the current model has an empty RDN, we can't move it.
- if ((int) Arr::first($parts) === 0) {
- throw new UnexpectedValueException('Current model does not contain an RDN to move.');
- }
-
- // Looks like we have a DN. We'll retrieve the leftmost RDN (the identifier).
- $rdn = Arr::get($parts, 0);
-
- return $this->rename($rdn, $newParentDn, $deleteOldRdn);
- }
-
- /**
- * Renames the current model to a new RDN and new parent.
- *
- * @param string $rdn The models new relative distinguished name. Example: "cn=JohnDoe"
- * @param Model|string|null $newParentDn The models new parent distinguished name (if moving). Leave this null if you are only renaming. Example: "ou=MovedUsers,dc=acme,dc=org"
- * @param bool|true $deleteOldRdn Whether to delete the old models relative distinguished name once renamed / moved.
- *
- * @return bool
- */
- public function rename($rdn, $newParentDn = null, $deleteOldRdn = true)
- {
- if ($newParentDn instanceof self) {
- $newParentDn = $newParentDn->getDn();
- }
-
- $moved = $this->query->getConnection()->rename($this->getDn(), $rdn, $newParentDn, $deleteOldRdn);
-
- if ($moved) {
- // If the model was successfully moved, we'll set its
- // new DN so we can sync it's attributes properly.
- $this->setDn("{$rdn},{$newParentDn}");
-
- $this->syncRaw();
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Constructs a new distinguished name that is creatable in the directory.
- *
- * @return DistinguishedName|string
- */
- protected function getCreatableDn()
- {
- return $this->getDnBuilder()->addCn($this->getCommonName());
- }
-
- /**
- * Returns the models creatable attributes.
- *
- * @return mixed
- */
- protected function getCreatableAttributes()
- {
- return Arr::except($this->getAttributes(), [$this->schema->distinguishedName()]);
- }
-
- /**
- * Determines if the given modification is valid.
- *
- * @param mixed $mod
- *
- * @return bool
- */
- protected function isValidModification($mod)
- {
- return is_array($mod) &&
- array_key_exists(BatchModification::KEY_MODTYPE, $mod) &&
- array_key_exists(BatchModification::KEY_ATTRIB, $mod);
- }
-
- /**
- * Builds the models modifications from its dirty attributes.
- *
- * @return array
- */
- protected function buildModificationsFromDirty()
- {
- foreach ($this->getDirty() as $attribute => $values) {
- // Make sure values is always an array.
- $values = (is_array($values) ? $values : [$values]);
-
- // Create a new modification.
- $modification = $this->newBatchModification($attribute, null, $values);
-
- if (array_key_exists($attribute, $this->original)) {
- // If the attribute we're modifying has an original value, we'll give the
- // BatchModification object its values to automatically determine
- // which type of LDAP operation we need to perform.
- $modification->setOriginal($this->original[$attribute]);
- }
-
- // Build the modification from its
- // possible original values.
- $modification->build();
-
- if ($modification->isValid()) {
- // Finally, we'll add the modification to the model.
- $this->addModification($modification);
- }
- }
-
- return $this->modifications;
- }
-
- /**
- * Validates that the current LDAP connection is secure.
- *
- * @throws ConnectionException
- *
- * @return void
- */
- protected function validateSecureConnection()
- {
- if (!$this->query->getConnection()->canChangePasswords()) {
- throw new ConnectionException(
- 'You must be connected to your LDAP server with TLS or SSL to perform this operation.'
- );
- }
- }
-
- /**
- * Converts the inserted string boolean to a PHP boolean.
- *
- * @param string $bool
- *
- * @return null|bool
- */
- protected function convertStringToBool($bool)
- {
- $bool = strtoupper($bool);
-
- if ($bool === strtoupper($this->schema->false())) {
- return false;
- } elseif ($bool === strtoupper($this->schema->true())) {
- return true;
- } else {
- return;
- }
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ModelDoesNotExistException.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ModelDoesNotExistException.php
deleted file mode 100644
index 393561052..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ModelDoesNotExistException.php
+++ /dev/null
@@ -1,36 +0,0 @@
-model = $model;
-
- $this->message = "Model [{$model}] does not exist.";
-
- return $this;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ModelNotFoundException.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ModelNotFoundException.php
deleted file mode 100644
index 6cc3334af..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/ModelNotFoundException.php
+++ /dev/null
@@ -1,45 +0,0 @@
-query = $query;
- $this->baseDn = $baseDn;
-
- $this->message = "No LDAP query results for filter: [{$query}] in: [{$baseDn}]";
-
- return $this;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Organization.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Organization.php
deleted file mode 100644
index 88129d01e..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Organization.php
+++ /dev/null
@@ -1,31 +0,0 @@
-getFirstAttribute($this->schema->organizationName());
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getCreatableDn()
- {
- return $this->getDnBuilder()->addO($this->getOrganization());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/OrganizationalUnit.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/OrganizationalUnit.php
deleted file mode 100644
index 0571e4d40..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/OrganizationalUnit.php
+++ /dev/null
@@ -1,31 +0,0 @@
-getFirstAttribute($this->schema->organizationalUnitShort());
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getCreatableDn()
- {
- return $this->getDnBuilder()->addOU($this->getOu());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Printer.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Printer.php
deleted file mode 100644
index e05586634..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/Printer.php
+++ /dev/null
@@ -1,286 +0,0 @@
-getFirstAttribute($this->schema->printerName());
- }
-
- /**
- * Returns the printers share name.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679408(v=vs.85).aspx
- *
- * @return string
- */
- public function getPrinterShareName()
- {
- return $this->getFirstAttribute($this->schema->printerShareName());
- }
-
- /**
- * Returns the printers memory.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679396(v=vs.85).aspx
- *
- * @return string
- */
- public function getMemory()
- {
- return $this->getFirstAttribute($this->schema->printerMemory());
- }
-
- /**
- * Returns the printers URL.
- *
- * @return string
- */
- public function getUrl()
- {
- return $this->getFirstAttribute($this->schema->url());
- }
-
- /**
- * Returns the printers location.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676839(v=vs.85).aspx
- *
- * @return string
- */
- public function getLocation()
- {
- return $this->getFirstAttribute($this->schema->location());
- }
-
- /**
- * Returns the server name that the
- * current printer is connected to.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679772(v=vs.85).aspx
- *
- * @return string
- */
- public function getServerName()
- {
- return $this->getFirstAttribute($this->schema->serverName());
- }
-
- /**
- * Returns true / false if the printer can print in color.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679382(v=vs.85).aspx
- *
- * @return null|bool
- */
- public function getColorSupported()
- {
- return $this->convertStringToBool(
- $this->getFirstAttribute(
- $this->schema->printerColorSupported()
- )
- );
- }
-
- /**
- * Returns true / false if the printer supports duplex printing.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679383(v=vs.85).aspx
- *
- * @return null|bool
- */
- public function getDuplexSupported()
- {
- return $this->convertStringToBool(
- $this->getFirstAttribute(
- $this->schema->printerDuplexSupported()
- )
- );
- }
-
- /**
- * Returns an array of printer paper types that the printer supports.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679395(v=vs.85).aspx
- *
- * @return array
- */
- public function getMediaSupported()
- {
- return $this->getAttribute($this->schema->printerMediaSupported());
- }
-
- /**
- * Returns true / false if the printer supports stapling.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679410(v=vs.85).aspx
- *
- * @return null|bool
- */
- public function getStaplingSupported()
- {
- return $this->convertStringToBool(
- $this->getFirstAttribute(
- $this->schema->printerStaplingSupported()
- )
- );
- }
-
- /**
- * Returns an array of the printers bin names.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679380(v=vs.85).aspx
- *
- * @return array
- */
- public function getPrintBinNames()
- {
- return $this->getAttribute($this->schema->printerBinNames());
- }
-
- /**
- * Returns the printers maximum resolution.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679391(v=vs.85).aspx
- *
- * @return string
- */
- public function getPrintMaxResolution()
- {
- return $this->getFirstAttribute($this->schema->printerMaxResolutionSupported());
- }
-
- /**
- * Returns the printers orientations supported.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679402(v=vs.85).aspx
- *
- * @return string
- */
- public function getPrintOrientations()
- {
- return $this->getFirstAttribute($this->schema->printerOrientationSupported());
- }
-
- /**
- * Returns the driver name of the printer.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675652(v=vs.85).aspx
- *
- * @return string
- */
- public function getDriverName()
- {
- return $this->getFirstAttribute($this->schema->driverName());
- }
-
- /**
- * Returns the printer drivers version number.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675653(v=vs.85).aspx
- *
- * @return string
- */
- public function getDriverVersion()
- {
- return $this->getFirstAttribute($this->schema->driverVersion());
- }
-
- /**
- * Returns the priority number of the printer.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679413(v=vs.85).aspx
- *
- * @return string
- */
- public function getPriority()
- {
- return $this->getFirstAttribute($this->schema->priority());
- }
-
- /**
- * Returns the printers start time.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679411(v=vs.85).aspx
- *
- * @return string
- */
- public function getPrintStartTime()
- {
- return $this->getFirstAttribute($this->schema->printerStartTime());
- }
-
- /**
- * Returns the printers end time.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679384(v=vs.85).aspx
- *
- * @return string
- */
- public function getPrintEndTime()
- {
- return $this->getFirstAttribute($this->schema->printerEndTime());
- }
-
- /**
- * Returns the port name of printer.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679131(v=vs.85).aspx
- *
- * @return string
- */
- public function getPortName()
- {
- return $this->getFirstAttribute($this->schema->portName());
- }
-
- /**
- * Returns the printers version number.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms680897(v=vs.85).aspx
- *
- * @return string
- */
- public function getVersionNumber()
- {
- return $this->getFirstAttribute($this->schema->versionNumber());
- }
-
- /**
- * Returns the print rate.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679405(v=vs.85).aspx
- *
- * @return string
- */
- public function getPrintRate()
- {
- return $this->getFirstAttribute($this->schema->printerPrintRate());
- }
-
- /**
- * Returns the print rate unit.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679406(v=vs.85).aspx
- *
- * @return string
- */
- public function getPrintRateUnit()
- {
- return $this->getFirstAttribute($this->schema->printerPrintRateUnit());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/RootDse.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/RootDse.php
deleted file mode 100644
index 31156c16f..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/RootDse.php
+++ /dev/null
@@ -1,85 +0,0 @@
-getFirstAttribute($this->schema->currentTime());
-
- return DateTime::createFromFormat($this->timestampFormat, $time)->getTimestamp();
- }
-
- /**
- * Returns the hosts current time in the models date format.
- *
- * @return string
- */
- public function getCurrentTimeDate()
- {
- return (new DateTime())->setTimestamp($this->getCurrentTime())->format($this->dateFormat);
- }
-
- /**
- * Returns the hosts configuration naming context.
- *
- * @return string
- */
- public function getConfigurationNamingContext()
- {
- return $this->getFirstAttribute($this->schema->configurationNamingContext());
- }
-
- /**
- * Returns the hosts schema naming context.
- *
- * @return string
- */
- public function getSchemaNamingContext()
- {
- return $this->getFirstAttribute($this->schema->schemaNamingContext());
- }
-
- /**
- * Returns the hosts DNS name.
- *
- * @return string
- */
- public function getDnsHostName()
- {
- return $this->getFirstAttribute($this->schema->dnsHostName());
- }
-
- /**
- * Returns the current hosts server name.
- *
- * @return string
- */
- public function getServerName()
- {
- return $this->getFirstAttribute($this->schema->serverName());
- }
-
- /**
- * Returns the DN of the root domain NC for this DC's forest.
- *
- * @return mixed
- */
- public function getRootDomainNamingContext()
- {
- return $this->getFirstAttribute($this->schema->rootDomainNamingContext());
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/User.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/User.php
deleted file mode 100644
index 14c33435e..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/User.php
+++ /dev/null
@@ -1,1054 +0,0 @@
-schema->objectGuid();
- }
-
- /**
- * Get the unique identifier for the user.
- *
- * @return mixed
- */
- public function getAuthIdentifier()
- {
- return $this->getConvertedGuid();
- }
-
- /**
- * Get the password for the user.
- *
- * @return string
- */
- public function getAuthPassword()
- {
- }
-
- /**
- * Get the token value for the "remember me" session.
- *
- * @return string
- */
- public function getRememberToken()
- {
- }
-
- /**
- * Set the token value for the "remember me" session.
- *
- * @param string $value
- *
- * @return void
- */
- public function setRememberToken($value)
- {
- }
-
- /**
- * Get the column name for the "remember me" token.
- *
- * @return string
- */
- public function getRememberTokenName()
- {
- }
-
- /**
- * Returns the department number.
- *
- * @return string
- */
- public function getDepartmentNumber()
- {
- return $this->getFirstAttribute($this->schema->departmentNumber());
- }
-
- /**
- * Sets the department number.
- *
- * @param string $number
- *
- * @return $this
- */
- public function setDepartmentNumber($number)
- {
- return $this->setFirstAttribute($this->schema->departmentNumber(), $number);
- }
-
- /**
- * Returns the users info.
- *
- * @return mixed
- */
- public function getInfo()
- {
- return $this->getFirstAttribute($this->schema->info());
- }
-
- /**
- * Sets the users info.
- *
- * @param string $info
- *
- * @return $this
- */
- public function setInfo($info)
- {
- return $this->setFirstAttribute($this->schema->info(), $info);
- }
-
- /**
- * Returns the users physical delivery office name.
- *
- * @return string
- */
- public function getPhysicalDeliveryOfficeName()
- {
- return $this->getFirstAttribute($this->schema->physicalDeliveryOfficeName());
- }
-
- /**
- * Sets the users physical delivery office name.
- *
- * @param string $deliveryOffice
- *
- * @return $this
- */
- public function setPhysicalDeliveryOfficeName($deliveryOffice)
- {
- return $this->setFirstAttribute($this->schema->physicalDeliveryOfficeName(), $deliveryOffice);
- }
-
- /**
- * Returns the users locale.
- *
- * @return string
- */
- public function getLocale()
- {
- return $this->getFirstAttribute($this->schema->locale());
- }
-
- /**
- * Sets the users locale.
- *
- * @param string $locale
- *
- * @return $this
- */
- public function setLocale($locale)
- {
- return $this->setFirstAttribute($this->schema->locale(), $locale);
- }
-
- /**
- * Returns the users company.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675457(v=vs.85).aspx
- *
- * @return string
- */
- public function getCompany()
- {
- return $this->getFirstAttribute($this->schema->company());
- }
-
- /**
- * Sets the users company.
- *
- * @param string $company
- *
- * @return $this
- */
- public function setCompany($company)
- {
- return $this->setFirstAttribute($this->schema->company(), $company);
- }
-
- /**
- * Returns the users mailbox store DN.
- *
- * @link https://msdn.microsoft.com/en-us/library/aa487565(v=exchg.65).aspx
- *
- * @return string
- */
- public function getHomeMdb()
- {
- return $this->getFirstAttribute($this->schema->homeMdb());
- }
-
- /**
- * Sets the users home drive.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676191(v=vs.85).aspx
- *
- * @return $this
- */
- public function setHomeDrive($drive)
- {
- return $this->setAttribute($this->schema->homeDrive(), $drive);
- }
-
- /**
- * Specifies the drive letter to which to map the UNC path specified by homeDirectory.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676191(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getHomeDrive()
- {
- return $this->getFirstAttribute($this->schema->homeDrive());
- }
-
- /**
- * Sets the users home directory.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676190(v=vs.85).aspx
- *
- * @param string $directory
- *
- * @return $this
- */
- public function setHomeDirectory($directory)
- {
- return $this->setAttribute($this->schema->homeDirectory(), $directory);
- }
-
- /**
- * The home directory for the account.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms676190(v=vs.85).aspx
- *
- * @return string|null
- */
- public function getHomeDirectory()
- {
- return $this->getFirstAttribute($this->schema->homeDirectory());
- }
-
- /**
- * The user's main home phone number.
- *
- * @link https://docs.microsoft.com/en-us/windows/desktop/ADSchema/a-homephone
- *
- * @return string|null
- */
- public function getHomePhone()
- {
- return $this->getFirstAttribute($this->schema->homePhone());
- }
-
- /**
- * Returns the users principal name.
- *
- * This is usually their email address.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms680857(v=vs.85).aspx
- *
- * @return string
- */
- public function getUserPrincipalName()
- {
- return $this->getFirstAttribute($this->schema->userPrincipalName());
- }
-
- /**
- * Sets the users user principal name.
- *
- * @param string $userPrincipalName
- *
- * @return $this
- */
- public function setUserPrincipalName($userPrincipalName)
- {
- return $this->setFirstAttribute($this->schema->userPrincipalName(), $userPrincipalName);
- }
-
- /**
- * Returns an array of workstations the user is assigned to.
- *
- * @return array
- */
- public function getUserWorkstations()
- {
- $workstations = $this->getFirstAttribute($this->schema->userWorkstations());
-
- return array_filter(explode(',', $workstations));
- }
-
- /**
- * Sets the workstations the user can login to.
- *
- * @param string|array $workstations The names of the workstations the user can login to.
- * Must be an array of names, or a comma separated
- * list of names.
- *
- * @return $this
- */
- public function setUserWorkstations($workstations = [])
- {
- if (is_array($workstations)) {
- $workstations = implode(',', $workstations);
- }
-
- return $this->setFirstAttribute($this->schema->userWorkstations(), $workstations);
- }
-
- /**
- * Returns the users script path if the user has one.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms679656(v=vs.85).aspx
- *
- * @return string
- */
- public function getScriptPath()
- {
- return $this->getFirstAttribute($this->schema->scriptPath());
- }
-
- /**
- * Sets the users script path.
- *
- * @param string $path
- *
- * @return $this
- */
- public function setScriptPath($path)
- {
- return $this->setFirstAttribute($this->schema->scriptPath(), $path);
- }
-
- /**
- * Returns the users bad password count.
- *
- * @return string
- */
- public function getBadPasswordCount()
- {
- return $this->getFirstAttribute($this->schema->badPasswordCount());
- }
-
- /**
- * Returns the users bad password time.
- *
- * @return string
- */
- public function getBadPasswordTime()
- {
- return $this->getFirstAttribute($this->schema->badPasswordTime());
- }
-
- /**
- * Returns the bad password time unix timestamp.
- *
- * @return float|null
- */
- public function getBadPasswordTimestamp()
- {
- if ($time = $this->getBadPasswordTime()) {
- return Utilities::convertWindowsTimeToUnixTime($time);
- }
- }
-
- /**
- * Returns the formatted timestamp of the bad password date.
- *
- * @throws \Exception
- *
- * @return string|null
- */
- public function getBadPasswordDate()
- {
- if ($timestamp = $this->getBadPasswordTimestamp()) {
- return (new DateTime())->setTimestamp($timestamp)->format($this->dateFormat);
- }
- }
-
- /**
- * Returns the time when the users password was set last.
- *
- * @return string
- */
- public function getPasswordLastSet()
- {
- return $this->getFirstAttribute($this->schema->passwordLastSet());
- }
-
- /**
- * Returns the password last set unix timestamp.
- *
- * @return float|null
- */
- public function getPasswordLastSetTimestamp()
- {
- if ($time = $this->getPasswordLastSet()) {
- return Utilities::convertWindowsTimeToUnixTime($time);
- }
- }
-
- /**
- * Returns the formatted timestamp of the password last set date.
- *
- * @throws \Exception
- *
- * @return string|null
- */
- public function getPasswordLastSetDate()
- {
- if ($timestamp = $this->getPasswordLastSetTimestamp()) {
- return (new DateTime())->setTimestamp($timestamp)->format($this->dateFormat);
- }
- }
-
- /**
- * Returns the users lockout time.
- *
- * @return string
- */
- public function getLockoutTime()
- {
- return $this->getFirstAttribute($this->schema->lockoutTime());
- }
-
- /**
- * Returns the users lockout unix timestamp.
- *
- * @return float|null
- */
- public function getLockoutTimestamp()
- {
- if ($time = $this->getLockoutTime()) {
- return Utilities::convertWindowsTimeToUnixTime($time);
- }
- }
-
- /**
- * Returns the formatted timestamp of the lockout date.
- *
- * @throws \Exception
- *
- * @return string|null
- */
- public function getLockoutDate()
- {
- if ($timestamp = $this->getLockoutTimestamp()) {
- return (new DateTime())->setTimestamp($timestamp)->format($this->dateFormat);
- }
- }
-
- /**
- * Clears the accounts lockout time, unlocking the account.
- *
- * @return $this
- */
- public function setClearLockoutTime()
- {
- return $this->setFirstAttribute($this->schema->lockoutTime(), 0);
- }
-
- /**
- * Returns the users profile file path.
- *
- * @return string
- */
- public function getProfilePath()
- {
- return $this->getFirstAttribute($this->schema->profilePath());
- }
-
- /**
- * Sets the users profile path.
- *
- * @param string $path
- *
- * @return $this
- */
- public function setProfilePath($path)
- {
- return $this->setFirstAttribute($this->schema->profilePath(), $path);
- }
-
- /**
- * Returns the users legacy exchange distinguished name.
- *
- * @return string
- */
- public function getLegacyExchangeDn()
- {
- return $this->getFirstAttribute($this->schema->legacyExchangeDn());
- }
-
- /**
- * Sets the users account expiry date.
- *
- * If no expiry time is given, the account is set to never expire.
- *
- * @link https://msdn.microsoft.com/en-us/library/ms675098(v=vs.85).aspx
- *
- * @param float $expiryTime
- *
- * @return $this
- */
- public function setAccountExpiry($expiryTime)
- {
- $time = is_null($expiryTime) ? '9223372036854775807' : (string) Utilities::convertUnixTimeToWindowsTime($expiryTime);
-
- return $this->setFirstAttribute($this->schema->accountExpires(), $time);
- }
-
- /**
- * Returns an array of address book DNs
- * that the user is listed to be shown in.
- *
- * @return array
- */
- public function getShowInAddressBook()
- {
- return $this->getAttribute($this->schema->showInAddressBook());
- }
-
- /**
- * Returns the users thumbnail photo base 64 encoded.
- *
- * Suitable for inserting into an HTML image element.
- *
- * @return string|null
- */
- public function getThumbnailEncoded()
- {
- if ($data = base64_decode($this->getThumbnail(), $strict = true)) {
- // In case we don't have the file info extension enabled,
- // we'll set the jpeg mime type as default.
- $mime = 'image/jpeg';
-
- $image = base64_encode($data);
-
- if (function_exists('finfo_open')) {
- $finfo = finfo_open();
-
- $mime = finfo_buffer($finfo, $data, FILEINFO_MIME_TYPE);
-
- return "data:$mime;base64,$image";
- }
-
- return "data:$mime;base64,$image";
- }
- }
-
- /**
- * Returns the users thumbnail photo.
- *
- * @return mixed
- */
- public function getThumbnail()
- {
- return $this->getFirstAttribute($this->schema->thumbnail());
- }
-
- /**
- * Sets the users thumbnail photo.
- *
- * @param string $data
- * @param bool $encode
- *
- * @return $this
- */
- public function setThumbnail($data, $encode = true)
- {
- if ($encode && !base64_decode($data, $strict = true)) {
- // If the string we're given is not base 64 encoded, then
- // we will encode it before setting it on the user.
- $data = base64_encode($data);
- }
-
- return $this->setAttribute($this->schema->thumbnail(), $data);
- }
-
- /**
- * Returns the users JPEG photo.
- *
- * @return null|string
- */
- public function getJpegPhotoEncoded()
- {
- $jpeg = $this->getJpegPhoto();
-
- return is_null($jpeg) ? $jpeg : 'data:image/jpeg;base64,'.base64_encode($jpeg);
- }
-
- /**
- * Returns the users JPEG photo.
- *
- * @return mixed
- */
- public function getJpegPhoto()
- {
- return $this->getFirstAttribute($this->schema->jpegPhoto());
- }
-
- /**
- * Sets the users JPEG photo.
- *
- * @param string $string
- *
- * @return $this
- */
- public function setJpegPhoto($string)
- {
- if (!base64_decode($string, $strict = true)) {
- $string = base64_encode($string);
- }
-
- return $this->setAttribute($this->schema->jpegPhoto(), $string);
- }
-
- /**
- * Return the employee ID.
- *
- * @return string
- */
- public function getEmployeeId()
- {
- return $this->getFirstAttribute($this->schema->employeeId());
- }
-
- /**
- * Sets the employee ID.
- *
- * @param string $employeeId
- *
- * @return $this
- */
- public function setEmployeeId($employeeId)
- {
- return $this->setFirstAttribute($this->schema->employeeId(), $employeeId);
- }
-
- /**
- * Returns the employee type.
- *
- * @return string|null
- */
- public function getEmployeeType()
- {
- return $this->getFirstAttribute($this->schema->employeeType());
- }
-
- /**
- * Sets the employee type.
- *
- * @param string $type
- *
- * @return $this
- */
- public function setEmployeeType($type)
- {
- return $this->setFirstAttribute($this->schema->employeeType(), $type);
- }
-
- /**
- * Returns the employee number.
- *
- * @return string
- */
- public function getEmployeeNumber()
- {
- return $this->getFirstAttribute($this->schema->employeeNumber());
- }
-
- /**
- * Sets the employee number.
- *
- * @param string $number
- *
- * @return $this
- */
- public function setEmployeeNumber($number)
- {
- return $this->setFirstAttribute($this->schema->employeeNumber(), $number);
- }
-
- /**
- * Returns the room number.
- *
- * @return string
- */
- public function getRoomNumber()
- {
- return $this->getFirstAttribute($this->schema->roomNumber());
- }
-
- /**
- * Sets the room number.
- *
- * @param string $number
- *
- * @return $this
- */
- public function setRoomNumber($number)
- {
- return $this->setFirstAttribute($this->schema->roomNumber(), $number);
- }
-
- /**
- * Return the personal title.
- *
- * @return $this
- */
- public function getPersonalTitle()
- {
- return $this->getFirstAttribute($this->schema->personalTitle());
- }
-
- /**
- * Sets the personal title.
- *
- * @param string $personalTitle
- *
- * @return $this
- */
- public function setPersonalTitle($personalTitle)
- {
- return $this->setFirstAttribute($this->schema->personalTitle(), $personalTitle);
- }
-
- /**
- * Return the user parameters.
- *
- * @return TSPropertyArray
- */
- public function getUserParameters()
- {
- return new TSPropertyArray($this->getFirstAttribute('userparameters'));
- }
-
- /**
- * Sets the user parameters.
- *
- * @param TSPropertyArray $userParameters
- *
- * @return $this
- */
- public function setUserParameters(TSPropertyArray $userParameters)
- {
- return $this->setFirstAttribute('userparameters', $userParameters->toBinary());
- }
-
- /**
- * Retrieves the primary group of the current user.
- *
- * @return Model|bool
- */
- public function getPrimaryGroup()
- {
- $groupSid = preg_replace('/\d+$/', $this->getPrimaryGroupId(), $this->getConvertedSid());
-
- return $this->query->newInstance()->findBySid($groupSid);
- }
-
- /**
- * Sets the password on the current user.
- *
- * @param string $password
- *
- * @throws AdldapException When no SSL or TLS secured connection is present.
- *
- * @return $this
- */
- public function setPassword($password)
- {
- $this->validateSecureConnection();
-
- $encodedPassword = call_user_func(static::getPasswordStrategy(), $password);
-
- if ($this->exists) {
- // If the record exists, we need to add a batch replace
- // modification, otherwise we'll receive a "type or
- // value" exists exception from our LDAP server.
- return $this->addModification(
- $this->newBatchModification(
- $this->schema->unicodePassword(),
- LDAP_MODIFY_BATCH_REPLACE,
- [$encodedPassword]
- )
- );
- } else {
- // Otherwise, we are creating a new record
- // and we can set the attribute normally.
- return $this->setFirstAttribute(
- $this->schema->unicodePassword(),
- $encodedPassword
- );
- }
- }
-
- /**
- * Sets the option to force the password change at the next logon.
- *
- * Does not work if the "Password never expires" option is enabled.
- *
- * @return $this
- */
- public function setEnableForcePasswordChange()
- {
- return $this->setFirstAttribute($this->schema->passwordLastSet(), 0);
- }
-
- /**
- * Sets the option to disable forcing a password change at the next logon.
- *
- * @return $this
- */
- public function setDisableForcePasswordChange()
- {
- return $this->setFirstAttribute($this->schema->passwordLastSet(), -1);
- }
-
- /**
- * Change the password of the current user. This must be performed over SSL / TLS.
- *
- * Throws an exception on failure.
- *
- * @param string $oldPassword The new password
- * @param string $newPassword The old password
- * @param bool $replaceNotRemove Alternative password change method. Set to true if you're receiving 'CONSTRAINT'
- * errors.
- *
- * @throws UserPasswordPolicyException When the new password does not match your password policy.
- * @throws UserPasswordIncorrectException When the old password is incorrect.
- * @throws AdldapException When an unknown cause of failure occurs.
- *
- * @return true
- */
- public function changePassword($oldPassword, $newPassword, $replaceNotRemove = false)
- {
- $this->validateSecureConnection();
-
- $attribute = $this->schema->unicodePassword();
-
- $modifications = [];
-
- if ($replaceNotRemove) {
- $modifications[] = $this->newBatchModification(
- $attribute,
- LDAP_MODIFY_BATCH_REPLACE,
- [call_user_func(static::getPasswordStrategy(), $newPassword)]
- );
- } else {
- // Create batch modification for removing the old password.
- $modifications[] = $this->newBatchModification(
- $attribute,
- LDAP_MODIFY_BATCH_REMOVE,
- [call_user_func(static::getPasswordStrategy(), $oldPassword)]
- );
-
- // Create batch modification for adding the new password.
- $modifications[] = $this->newBatchModification(
- $attribute,
- LDAP_MODIFY_BATCH_ADD,
- [call_user_func(static::getPasswordStrategy(), $newPassword)]
- );
- }
-
- // Add the modifications.
- foreach ($modifications as $modification) {
- $this->addModification($modification);
- }
-
- $result = @$this->update();
-
- if (!$result) {
- // If the user failed to update, we'll see if we can
- // figure out why by retrieving the extended error.
- $error = $this->query->getConnection()->getExtendedError();
- $code = $this->query->getConnection()->getExtendedErrorCode();
-
- switch ($code) {
- case '0000052D':
- throw new UserPasswordPolicyException(
- "Error: $code. Your new password does not match the password policy."
- );
- case '00000056':
- throw new UserPasswordIncorrectException(
- "Error: $code. Your old password is incorrect."
- );
- default:
- throw new AdldapException($error);
- }
- }
-
- return $result;
- }
-
- /**
- * Return true / false if LDAP User is active (enabled & not expired).
- *
- * @return bool
- */
- public function isActive()
- {
- return $this->isEnabled() && !$this->isExpired();
- }
-
- /**
- * Return true / false if the LDAP User is expired.
- *
- * @param DateTime $date Optional date
- *
- * @return bool
- */
- public function isExpired(DateTime $date = null)
- {
- // Here we'll determine if the account expires by checking is expiration date.
- if ($expirationDate = $this->expirationDate()) {
- $date = $date ?: new DateTime();
-
- return $expirationDate <= $date;
- }
-
- // The account has no expiry date.
- return false;
- }
-
- /**
- * Return the expiration date of the user account.
- *
- * @throws \Exception
- *
- * @return DateTime|null
- */
- public function expirationDate()
- {
- $accountExpiry = $this->getAccountExpiry();
-
- // If the account expiry is zero or the expiry is equal to
- // ActiveDirectory's 'never expire' value,
- // then we'll return null here.
- if ($accountExpiry == 0 || $accountExpiry == $this->getSchema()->neverExpiresDate()) {
- return;
- }
-
- $unixTime = Utilities::convertWindowsTimeToUnixTime($accountExpiry);
-
- return (new DateTime())->setTimestamp($unixTime);
- }
-
- /**
- * Returns the users account expiry date.
- *
- * @return string
- */
- public function getAccountExpiry()
- {
- return $this->getFirstAttribute($this->schema->accountExpires());
- }
-
- /**
- * Returns true / false if the users password is expired.
- *
- * @return bool
- */
- public function passwordExpired()
- {
- // First we'll check the users userAccountControl to see if
- // it contains the 'password does not expire' flag.
- if ($this->getUserAccountControlObject()->has(AccountControl::DONT_EXPIRE_PASSWORD)) {
- return false;
- }
-
- $lastSet = (int) $this->getPasswordLastSet();
-
- if ($lastSet === 0) {
- // If the users last set time is zero, the password has
- // been manually expired by an administrator.
- return true;
- }
-
- // We'll check if we're using the ActiveDirectory schema to retrieve
- // the max password age, as this is an AD-only feature.
- if ($this->schema instanceof ActiveDirectory) {
- $query = $this->query->newInstance();
-
- // We need to get the root domain object to be able to
- // retrieve the max password age on the domain.
- $rootDomainObject = $query->select($this->schema->maxPasswordAge())
- ->whereHas($this->schema->objectClass())
- ->first();
-
- $maxPasswordAge = $rootDomainObject->getMaxPasswordAge();
-
- if (empty($maxPasswordAge)) {
- // There is not a max password age set on the LDAP server.
- return false;
- }
-
- // convert from 100 nanosecond ticks to seconds
- $maxPasswordAgeSeconds = $maxPasswordAge / 10000000;
-
- $lastSetUnixEpoch = Utilities::convertWindowsTimeToUnixTime($lastSet);
- $passwordExpiryTime = $lastSetUnixEpoch - $maxPasswordAgeSeconds;
-
- $expiresAt = (new DateTime())->setTimestamp($passwordExpiryTime);
-
- // If our current time is greater than the users password
- // expiry time, the users password has expired.
- return (new DateTime())->getTimestamp() >= $expiresAt->getTimestamp();
- }
-
- return false;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/UserPasswordIncorrectException.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/UserPasswordIncorrectException.php
deleted file mode 100644
index 44cb39bfc..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Models/UserPasswordIncorrectException.php
+++ /dev/null
@@ -1,16 +0,0 @@
- [],
- 'or' => [],
- 'raw' => [],
- ];
-
- /**
- * The size limit of the query.
- *
- * @var int
- */
- public $limit = 0;
-
- /**
- * Determines whether the current query is paginated.
- *
- * @var bool
- */
- public $paginated = false;
-
- /**
- * The field to sort search results by.
- *
- * @var string
- */
- protected $sortByField = '';
-
- /**
- * The direction to sort the results by.
- *
- * @var string
- */
- protected $sortByDirection = '';
-
- /**
- * The sort flags for sorting query results.
- *
- * @var int
- */
- protected $sortByFlags;
-
- /**
- * The distinguished name to perform searches upon.
- *
- * @var string|null
- */
- protected $dn;
-
- /**
- * The default query type.
- *
- * @var string
- */
- protected $type = 'search';
-
- /**
- * Determines whether or not to return LDAP results in their raw array format.
- *
- * @var bool
- */
- protected $raw = false;
-
- /**
- * Determines whether the query is nested.
- *
- * @var bool
- */
- protected $nested = false;
-
- /**
- * Determines whether the query should be cached.
- *
- * @var bool
- */
- protected $caching = false;
-
- /**
- * How long the query should be cached until.
- *
- * @var \DateTimeInterface|null
- */
- protected $cacheUntil = null;
-
- /**
- * Determines whether the query cache must be flushed.
- *
- * @var bool
- */
- protected $flushCache = false;
-
- /**
- * The current connection instance.
- *
- * @var ConnectionInterface
- */
- protected $connection;
-
- /**
- * The current grammar instance.
- *
- * @var Grammar
- */
- protected $grammar;
-
- /**
- * The current schema instance.
- *
- * @var SchemaInterface
- */
- protected $schema;
-
- /**
- * The current cache instance.
- *
- * @var Cache|null
- */
- protected $cache;
-
- /**
- * Constructor.
- *
- * @param ConnectionInterface $connection
- * @param Grammar|null $grammar
- * @param SchemaInterface|null $schema
- */
- public function __construct(ConnectionInterface $connection, Grammar $grammar = null, SchemaInterface $schema = null)
- {
- $this->setConnection($connection)
- ->setGrammar($grammar)
- ->setSchema($schema);
- }
-
- /**
- * Sets the current connection.
- *
- * @param ConnectionInterface $connection
- *
- * @return Builder
- */
- public function setConnection(ConnectionInterface $connection)
- {
- $this->connection = $connection;
-
- return $this;
- }
-
- /**
- * Sets the current filter grammar.
- *
- * @param Grammar|null $grammar
- *
- * @return Builder
- */
- public function setGrammar(Grammar $grammar = null)
- {
- $this->grammar = $grammar ?: new Grammar();
-
- return $this;
- }
-
- /**
- * Sets the current schema.
- *
- * @param SchemaInterface|null $schema
- *
- * @return Builder
- */
- public function setSchema(SchemaInterface $schema = null)
- {
- $this->schema = $schema ?: new ActiveDirectory();
-
- return $this;
- }
-
- /**
- * Returns the current schema.
- *
- * @return SchemaInterface
- */
- public function getSchema()
- {
- return $this->schema;
- }
-
- /**
- * Sets the cache to store query results.
- *
- * @param Cache|null $cache
- */
- public function setCache(Cache $cache = null)
- {
- $this->cache = $cache;
-
- return $this;
- }
-
- /**
- * Returns a new Query Builder instance.
- *
- * @param string $baseDn
- *
- * @return Builder
- */
- public function newInstance($baseDn = null)
- {
- // We'll set the base DN of the new Builder so
- // developers don't need to do this manually.
- $dn = is_null($baseDn) ? $this->getDn() : $baseDn;
-
- return (new static($this->connection, $this->grammar, $this->schema))
- ->setDn($dn);
- }
-
- /**
- * Returns a new nested Query Builder instance.
- *
- * @param Closure|null $closure
- *
- * @return $this
- */
- public function newNestedInstance(Closure $closure = null)
- {
- $query = $this->newInstance()->nested();
-
- if ($closure) {
- call_user_func($closure, $query);
- }
-
- return $query;
- }
-
- /**
- * Returns the current query.
- *
- * @return Collection|array
- */
- public function get()
- {
- // We'll mute any warnings / errors here. We just need to
- // know if any query results were returned.
- return @$this->query($this->getQuery());
- }
-
- /**
- * Compiles and returns the current query string.
- *
- * @return string
- */
- public function getQuery()
- {
- // We need to ensure we have at least one filter, as
- // no query results will be returned otherwise.
- if (count(array_filter($this->filters)) === 0) {
- $this->whereHas($this->schema->objectClass());
- }
-
- return $this->grammar->compile($this);
- }
-
- /**
- * Returns the unescaped query.
- *
- * @return string
- */
- public function getUnescapedQuery()
- {
- return Utilities::unescape($this->getQuery());
- }
-
- /**
- * Returns the current Grammar instance.
- *
- * @return Grammar
- */
- public function getGrammar()
- {
- return $this->grammar;
- }
-
- /**
- * Returns the current Connection instance.
- *
- * @return ConnectionInterface
- */
- public function getConnection()
- {
- return $this->connection;
- }
-
- /**
- * Returns the builders DN to perform searches upon.
- *
- * @return string
- */
- public function getDn()
- {
- return $this->dn;
- }
-
- /**
- * Sets the DN to perform searches upon.
- *
- * @param string|Model|null $dn
- *
- * @return Builder
- */
- public function setDn($dn = null)
- {
- $this->dn = $dn instanceof Model ? $dn->getDn() : $dn;
-
- return $this;
- }
-
- /**
- * Alias for setting the base DN of the query.
- *
- * @param string|Model|null $dn
- *
- * @return Builder
- */
- public function in($dn = null)
- {
- return $this->setDn($dn);
- }
-
- /**
- * Sets the size limit of the current query.
- *
- * @param int $limit
- *
- * @return Builder
- */
- public function limit($limit = 0)
- {
- $this->limit = $limit;
-
- return $this;
- }
-
- /**
- * Performs the specified query on the current LDAP connection.
- *
- * @param string $query
- *
- * @return \Adldap\Query\Collection|array
- */
- public function query($query)
- {
- $start = microtime(true);
-
- // Here we will create the execution callback. This allows us
- // to only execute an LDAP request if caching is disabled
- // or if no cache of the given query exists yet.
- $callback = function () use ($query) {
- return $this->parse($this->run($query));
- };
-
- // If caching is enabled and we have a cache instance available,
- // we will try to retrieve the cached results instead.
- // Otherwise, we will simply execute the callback.
- if ($this->caching && $this->cache) {
- $results = $this->getCachedResponse($this->getCacheKey($query), $callback);
- } else {
- $results = $callback();
- }
-
- // Log the query.
- $this->logQuery($this, $this->type, $this->getElapsedTime($start));
-
- // Process & return the results.
- return $this->newProcessor()->process($results);
- }
-
- /**
- * Paginates the current LDAP query.
- *
- * @param int $perPage
- * @param int $currentPage
- * @param bool $isCritical
- *
- * @return Paginator
- */
- public function paginate($perPage = 1000, $currentPage = 0, $isCritical = true)
- {
- $this->paginated = true;
-
- $start = microtime(true);
-
- $query = $this->getQuery();
-
- // Here we will create the pagination callback. This allows us
- // to only execute an LDAP request if caching is disabled
- // or if no cache of the given query exists yet.
- $callback = function () use ($query, $perPage, $isCritical) {
- return $this->runPaginate($query, $perPage, $isCritical);
- };
-
- // If caching is enabled and we have a cache instance available,
- // we will try to retrieve the cached results instead.
- if ($this->caching && $this->cache) {
- $pages = $this->getCachedResponse($this->getCacheKey($query), $callback);
- } else {
- $pages = $callback();
- }
-
- // Log the query.
- $this->logQuery($this, 'paginate', $this->getElapsedTime($start));
-
- // Process & return the results.
- return $this->newProcessor()->processPaginated($pages, $perPage, $currentPage);
- }
-
- /**
- * Get the cached response or execute and cache the callback value.
- *
- * @param string $key
- * @param Closure $callback
- *
- * @return mixed
- */
- protected function getCachedResponse($key, Closure $callback)
- {
- if ($this->flushCache) {
- $this->cache->delete($key);
- }
-
- return $this->cache->remember($key, $this->cacheUntil, $callback);
- }
-
- /**
- * Runs the query operation with the given filter.
- *
- * @param string $filter
- *
- * @return resource
- */
- protected function run($filter)
- {
- return $this->connection->{$this->type}(
- $this->getDn(),
- $filter,
- $this->getSelects(),
- $onlyAttributes = false,
- $this->limit
- );
- }
-
- /**
- * Runs the paginate operation with the given filter.
- *
- * @param string $filter
- * @param int $perPage
- * @param bool $isCritical
- *
- * @return array
- */
- protected function runPaginate($filter, $perPage, $isCritical)
- {
- return $this->connection->supportsServerControlsInMethods() ?
- $this->compatiblePaginationCallback($filter, $perPage, $isCritical) :
- $this->deprecatedPaginationCallback($filter, $perPage, $isCritical);
- }
-
- /**
- * Create a deprecated pagination callback compatible with PHP 7.2.
- *
- * @param string $filter
- * @param int $perPage
- * @param bool $isCritical
- *
- * @return array
- */
- protected function deprecatedPaginationCallback($filter, $perPage, $isCritical)
- {
- $pages = [];
-
- $cookie = '';
-
- do {
- $this->connection->controlPagedResult($perPage, $isCritical, $cookie);
-
- if (! $resource = $this->run($filter)) {
- break;
- }
-
- // If we have been given a valid resource, we will retrieve the next
- // pagination cookie to send for our next pagination request.
- $this->connection->controlPagedResultResponse($resource, $cookie);
-
- $pages[] = $this->parse($resource);
- } while (!empty($cookie));
-
- // Reset paged result on the current connection. We won't pass in the current $perPage
- // parameter since we want to reset the page size to the default '1000'. Sending '0'
- // eliminates any further opportunity for running queries in the same request,
- // even though that is supposed to be the correct usage.
- $this->connection->controlPagedResult();
-
- return $pages;
- }
-
- /**
- * Create a compatible pagination callback compatible with PHP 7.3 and greater.
- *
- * @param string $filter
- * @param int $perPage
- * @param bool $isCritical
- *
- * @return array
- */
- protected function compatiblePaginationCallback($filter, $perPage, $isCritical)
- {
- $pages = [];
-
- // Setup our paged results control.
- $controls = [
- LDAP_CONTROL_PAGEDRESULTS => [
- 'oid' => LDAP_CONTROL_PAGEDRESULTS,
- 'isCritical' => $isCritical,
- 'value' => [
- 'size' => $perPage,
- 'cookie' => '',
- ],
- ],
- ];
-
- do {
- // Update the server controls.
- $this->connection->setOption(LDAP_OPT_SERVER_CONTROLS, $controls);
-
- if (! $resource = $this->run($filter)) {
- break;
- }
-
- $errorCode = $dn = $errorMessage = $refs = null;
-
- // Update the server controls with the servers response.
- $this->connection->parseResult($resource, $errorCode, $dn, $errorMessage, $refs, $controls);
-
- $pages[] = $this->parse($resource);
-
- // Reset paged result on the current connection. We won't pass in the current $perPage
- // parameter since we want to reset the page size to the default '1000'. Sending '0'
- // eliminates any further opportunity for running queries in the same request,
- // even though that is supposed to be the correct usage.
- $controls[LDAP_CONTROL_PAGEDRESULTS]['value']['size'] = $perPage;
- } while (!empty($controls[LDAP_CONTROL_PAGEDRESULTS]['value']['cookie']));
-
- // After running the query, we will clear the LDAP server controls. This
- // allows the controls to be automatically reset before each new query
- // that is conducted on the same connection during each request.
- $this->connection->setOption(LDAP_OPT_SERVER_CONTROLS, []);
-
- return $pages;
- }
-
- /**
- * Parses the given LDAP resource by retrieving its entries.
- *
- * @param resource $resource
- *
- * @return array
- */
- protected function parse($resource)
- {
- // Normalize entries. Get entries returns false on failure.
- // We'll always want an array in this situation.
- $entries = $this->connection->getEntries($resource) ?: [];
-
- // Free up memory.
- if (is_resource($resource)) {
- $this->connection->freeResult($resource);
- }
-
- return $entries;
- }
-
- /**
- * Returns the cache key.
- *
- * @param string $query
- *
- * @return string
- */
- protected function getCacheKey($query)
- {
- $key = $this->connection->getHost()
- .$this->type
- .$this->getDn()
- .$query
- .implode('', $this->getSelects())
- .$this->limit
- .$this->paginated;
-
- return md5($key);
- }
-
- /**
- * Returns the first entry in a search result.
- *
- * @param array|string $columns
- *
- * @return Model|array|null
- */
- public function first($columns = [])
- {
- $results = $this->select($columns)->limit(1)->get();
-
- // Since results may be returned inside an array if `raw()`
- // is specified, then we'll use our array helper
- // to retrieve the first result.
- return Arr::get($results, 0);
- }
-
- /**
- * Returns the first entry in a search result.
- *
- * If no entry is found, an exception is thrown.
- *
- * @param array|string $columns
- *
- * @throws ModelNotFoundException
- *
- * @return Model|array
- */
- public function firstOrFail($columns = [])
- {
- $record = $this->first($columns);
-
- if (!$record) {
- throw (new ModelNotFoundException())
- ->setQuery($this->getUnescapedQuery(), $this->getDn());
- }
-
- return $record;
- }
-
- /**
- * Finds a record by the specified attribute and value.
- *
- * @param string $attribute
- * @param string $value
- * @param array|string $columns
- *
- * @return Model|array|false
- */
- public function findBy($attribute, $value, $columns = [])
- {
- try {
- return $this->findByOrFail($attribute, $value, $columns);
- } catch (ModelNotFoundException $e) {
- return;
- }
- }
-
- /**
- * Finds a record by the specified attribute and value.
- *
- * If no record is found an exception is thrown.
- *
- * @param string $attribute
- * @param string $value
- * @param array|string $columns
- *
- * @throws ModelNotFoundException
- *
- * @return Model|array
- */
- public function findByOrFail($attribute, $value, $columns = [])
- {
- return $this->whereEquals($attribute, $value)->firstOrFail($columns);
- }
-
- /**
- * Finds a record using ambiguous name resolution.
- *
- * @param string|array $value
- * @param array|string $columns
- *
- * @return Model|array|null
- */
- public function find($value, $columns = [])
- {
- if (is_array($value)) {
- return $this->findMany($value, $columns);
- }
-
- // If we're not using ActiveDirectory, we can't use ANR. We'll make our own query.
- if (!is_a($this->schema, ActiveDirectory::class)) {
- return $this->prepareAnrEquivalentQuery($value)->first($columns);
- }
-
- return $this->findBy($this->schema->anr(), $value, $columns);
- }
-
- /**
- * Finds multiple records using ambiguous name resolution.
- *
- * @param array $values
- * @param array $columns
- *
- * @return \Adldap\Query\Collection|array
- */
- public function findMany(array $values = [], $columns = [])
- {
- $this->select($columns);
-
- if (!is_a($this->schema, ActiveDirectory::class)) {
- $query = $this;
-
- foreach ($values as $value) {
- $query->prepareAnrEquivalentQuery($value);
- }
-
- return $query->get();
- }
-
- return $this->findManyBy($this->schema->anr(), $values);
- }
-
- /**
- * Creates an ANR equivalent query for LDAP distributions that do not support ANR.
- *
- * @param string $value
- *
- * @return Builder
- */
- protected function prepareAnrEquivalentQuery($value)
- {
- return $this->orFilter(function (self $query) use ($value) {
- $locateBy = [
- $this->schema->name(),
- $this->schema->email(),
- $this->schema->userId(),
- $this->schema->lastName(),
- $this->schema->firstName(),
- $this->schema->commonName(),
- $this->schema->displayName(),
- ];
-
- foreach ($locateBy as $attribute) {
- $query->whereEquals($attribute, $value);
- }
- });
- }
-
- /**
- * Finds many records by the specified attribute.
- *
- * @param string $attribute
- * @param array $values
- * @param array $columns
- *
- * @return \Adldap\Query\Collection|array
- */
- public function findManyBy($attribute, array $values = [], $columns = [])
- {
- $query = $this->select($columns);
-
- foreach ($values as $value) {
- $query->orWhere([$attribute => $value]);
- }
-
- return $query->get();
- }
-
- /**
- * Finds a record using ambiguous name resolution.
- *
- * If a record is not found, an exception is thrown.
- *
- * @param string $value
- * @param array|string $columns
- *
- * @throws ModelNotFoundException
- *
- * @return Model|array
- */
- public function findOrFail($value, $columns = [])
- {
- $entry = $this->find($value, $columns);
-
- // Make sure we check if the result is an entry or an array before
- // we throw an exception in case the user wants raw results.
- if (!$entry instanceof Model && !is_array($entry)) {
- throw (new ModelNotFoundException())
- ->setQuery($this->getUnescapedQuery(), $this->getDn());
- }
-
- return $entry;
- }
-
- /**
- * Finds a record by its distinguished name.
- *
- * @param string $dn
- * @param array|string $columns
- *
- * @return bool|Model
- */
- public function findByDn($dn, $columns = [])
- {
- try {
- return $this->findByDnOrFail($dn, $columns);
- } catch (ModelNotFoundException $e) {
- return;
- }
- }
-
- /**
- * Finds a record by its distinguished name.
- *
- * Fails upon no records returned.
- *
- * @param string $dn
- * @param array|string $columns
- *
- * @throws ModelNotFoundException
- *
- * @return Model|array
- */
- public function findByDnOrFail($dn, $columns = [])
- {
- // Since we're setting our base DN to be able to retrieve a model
- // by its distinguished name, we need to set it back to
- // our configured base so it is not overwritten.
- $base = $this->getDn();
-
- $model = $this->setDn($dn)
- ->read()
- ->whereHas($this->schema->objectClass())
- ->firstOrFail($columns);
-
- // Reset the models query builder (in case a model is returned).
- // Otherwise, we must be requesting a raw result.
- if ($model instanceof Model) {
- $model->setQuery($this->in($base));
- }
-
- return $model;
- }
-
- /**
- * Finds a record by its string GUID.
- *
- * @param string $guid
- * @param array|string $columns
- *
- * @return Model|array|false
- */
- public function findByGuid($guid, $columns = [])
- {
- try {
- return $this->findByGuidOrFail($guid, $columns);
- } catch (ModelNotFoundException $e) {
- return;
- }
- }
-
- /**
- * Finds a record by its string GUID.
- *
- * Fails upon no records returned.
- *
- * @param string $guid
- * @param array|string $columns
- *
- * @throws ModelNotFoundException
- *
- * @return Model|array
- */
- public function findByGuidOrFail($guid, $columns = [])
- {
- if ($this->schema->objectGuidRequiresConversion()) {
- $guid = Utilities::stringGuidToHex($guid);
- }
-
- return $this->select($columns)->whereRaw([
- $this->schema->objectGuid() => $guid,
- ])->firstOrFail();
- }
-
- /**
- * Finds a record by its Object SID.
- *
- * @param string $sid
- * @param array|string $columns
- *
- * @return Model|array|false
- */
- public function findBySid($sid, $columns = [])
- {
- try {
- return $this->findBySidOrFail($sid, $columns);
- } catch (ModelNotFoundException $e) {
- return;
- }
- }
-
- /**
- * Finds a record by its Object SID.
- *
- * Fails upon no records returned.
- *
- * @param string $sid
- * @param array|string $columns
- *
- * @throws ModelNotFoundException
- *
- * @return Model|array
- */
- public function findBySidOrFail($sid, $columns = [])
- {
- return $this->findByOrFail($this->schema->objectSid(), $sid, $columns);
- }
-
- /**
- * Finds the Base DN of your domain controller.
- *
- * @return string|bool
- */
- public function findBaseDn()
- {
- $result = $this->setDn(null)
- ->read()
- ->raw()
- ->whereHas($this->schema->objectClass())
- ->first();
-
- $key = $this->schema->defaultNamingContext();
-
- if (is_array($result) && array_key_exists($key, $result)) {
- if (array_key_exists(0, $result[$key])) {
- return $result[$key][0];
- }
- }
-
- return false;
- }
-
- /**
- * Adds the inserted fields to query on the current LDAP connection.
- *
- * @param array|string $columns
- *
- * @return Builder
- */
- public function select($columns = [])
- {
- $columns = is_array($columns) ? $columns : func_get_args();
-
- if (!empty($columns)) {
- $this->columns = $columns;
- }
-
- return $this;
- }
-
- /**
- * Adds a raw filter to the current query.
- *
- * @param array|string $filters
- *
- * @return Builder
- */
- public function rawFilter($filters = [])
- {
- $filters = is_array($filters) ? $filters : func_get_args();
-
- foreach ($filters as $filter) {
- $this->filters['raw'][] = $filter;
- }
-
- return $this;
- }
-
- /**
- * Adds a nested 'and' filter to the current query.
- *
- * @param Closure $closure
- *
- * @return Builder
- */
- public function andFilter(Closure $closure)
- {
- $query = $this->newNestedInstance($closure);
-
- $filter = $this->grammar->compileAnd($query->getQuery());
-
- return $this->rawFilter($filter);
- }
-
- /**
- * Adds a nested 'or' filter to the current query.
- *
- * @param Closure $closure
- *
- * @return Builder
- */
- public function orFilter(Closure $closure)
- {
- $query = $this->newNestedInstance($closure);
-
- $filter = $this->grammar->compileOr($query->getQuery());
-
- return $this->rawFilter($filter);
- }
-
- /**
- * Adds a nested 'not' filter to the current query.
- *
- * @param Closure $closure
- *
- * @return Builder
- */
- public function notFilter(Closure $closure)
- {
- $query = $this->newNestedInstance($closure);
-
- $filter = $this->grammar->compileNot($query->getQuery());
-
- return $this->rawFilter($filter);
- }
-
- /**
- * Adds a where clause to the current query.
- *
- * @param string|array $field
- * @param string $operator
- * @param string $value
- * @param string $boolean
- * @param bool $raw
- *
- * @throws InvalidArgumentException
- *
- * @return Builder
- */
- public function where($field, $operator = null, $value = null, $boolean = 'and', $raw = false)
- {
- if (is_array($field)) {
- // If the column is an array, we will assume it is an array of
- // key-value pairs and can add them each as a where clause.
- return $this->addArrayOfWheres($field, $boolean, $raw);
- }
-
- // We'll bypass the 'has' and 'notHas' operator since they
- // only require two arguments inside the where method.
- $bypass = [Operator::$has, Operator::$notHas];
-
- // Here we will make some assumptions about the operator. If only
- // 2 values are passed to the method, we will assume that
- // the operator is 'equals' and keep going.
- if (func_num_args() === 2 && in_array($operator, $bypass) === false) {
- list($value, $operator) = [$operator, '='];
- }
-
- if (!in_array($operator, Operator::all())) {
- throw new InvalidArgumentException("Invalid where operator: {$operator}");
- }
-
- // We'll escape the value if raw isn't requested.
- $value = $raw ? $value : $this->escape($value);
-
- $field = $this->escape($field, $ignore = null, 3);
-
- $this->addFilter($boolean, compact('field', 'operator', 'value'));
-
- return $this;
- }
-
- /**
- * Adds a raw where clause to the current query.
- *
- * Values given to this method are not escaped.
- *
- * @param string|array $field
- * @param string $operator
- * @param string $value
- *
- * @return Builder
- */
- public function whereRaw($field, $operator = null, $value = null)
- {
- return $this->where($field, $operator, $value, 'and', true);
- }
-
- /**
- * Adds a 'where equals' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereEquals($field, $value)
- {
- return $this->where($field, Operator::$equals, $value);
- }
-
- /**
- * Adds a 'where not equals' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereNotEquals($field, $value)
- {
- return $this->where($field, Operator::$doesNotEqual, $value);
- }
-
- /**
- * Adds a 'where approximately equals' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereApproximatelyEquals($field, $value)
- {
- return $this->where($field, Operator::$approximatelyEquals, $value);
- }
-
- /**
- * Adds a 'where has' clause to the current query.
- *
- * @param string $field
- *
- * @return Builder
- */
- public function whereHas($field)
- {
- return $this->where($field, Operator::$has);
- }
-
- /**
- * Adds a 'where not has' clause to the current query.
- *
- * @param string $field
- *
- * @return Builder
- */
- public function whereNotHas($field)
- {
- return $this->where($field, Operator::$notHas);
- }
-
- /**
- * Adds a 'where contains' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereContains($field, $value)
- {
- return $this->where($field, Operator::$contains, $value);
- }
-
- /**
- * Adds a 'where contains' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereNotContains($field, $value)
- {
- return $this->where($field, Operator::$notContains, $value);
- }
-
- /**
- * Query for entries that match any of the values provided for the given field.
- *
- * @param string $field
- * @param array $values
- *
- * @return Builder
- */
- public function whereIn($field, array $values)
- {
- return $this->orFilter(function (self $query) use ($field, $values) {
- foreach ($values as $value) {
- $query->whereEquals($field, $value);
- }
- });
- }
-
- /**
- * Adds a 'between' clause to the current query.
- *
- * @param string $field
- * @param array $values
- *
- * @return Builder
- */
- public function whereBetween($field, array $values)
- {
- return $this->where([
- [$field, '>=', $values[0]],
- [$field, '<=', $values[1]],
- ]);
- }
-
- /**
- * Adds a 'where starts with' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereStartsWith($field, $value)
- {
- return $this->where($field, Operator::$startsWith, $value);
- }
-
- /**
- * Adds a 'where *not* starts with' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereNotStartsWith($field, $value)
- {
- return $this->where($field, Operator::$notStartsWith, $value);
- }
-
- /**
- * Adds a 'where ends with' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereEndsWith($field, $value)
- {
- return $this->where($field, Operator::$endsWith, $value);
- }
-
- /**
- * Adds a 'where *not* ends with' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function whereNotEndsWith($field, $value)
- {
- return $this->where($field, Operator::$notEndsWith, $value);
- }
-
- /**
- * Adds a enabled filter to the current query.
- *
- * @return Builder
- */
- public function whereEnabled()
- {
- return $this->rawFilter($this->schema->filterEnabled());
- }
-
- /**
- * Adds a disabled filter to the current query.
- *
- * @return Builder
- */
- public function whereDisabled()
- {
- return $this->rawFilter($this->schema->filterDisabled());
- }
-
- /**
- * Adds a 'member of' filter to the current query.
- *
- * @param string $dn
- *
- * @return Builder
- */
- public function whereMemberOf($dn)
- {
- return $this->whereEquals($this->schema->memberOfRecursive(), $dn);
- }
-
- /**
- * Adds an 'or where' clause to the current query.
- *
- * @param array|string $field
- * @param string|null $operator
- * @param string|null $value
- *
- * @return Builder
- */
- public function orWhere($field, $operator = null, $value = null)
- {
- return $this->where($field, $operator, $value, 'or');
- }
-
- /**
- * Adds a raw or where clause to the current query.
- *
- * Values given to this method are not escaped.
- *
- * @param string $field
- * @param string $operator
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereRaw($field, $operator = null, $value = null)
- {
- return $this->where($field, $operator, $value, 'or', true);
- }
-
- /**
- * Adds an 'or where has' clause to the current query.
- *
- * @param string $field
- *
- * @return Builder
- */
- public function orWhereHas($field)
- {
- return $this->orWhere($field, Operator::$has);
- }
-
- /**
- * Adds a 'where not has' clause to the current query.
- *
- * @param string $field
- *
- * @return Builder
- */
- public function orWhereNotHas($field)
- {
- return $this->orWhere($field, Operator::$notHas);
- }
-
- /**
- * Adds an 'or where equals' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereEquals($field, $value)
- {
- return $this->orWhere($field, Operator::$equals, $value);
- }
-
- /**
- * Adds an 'or where not equals' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereNotEquals($field, $value)
- {
- return $this->orWhere($field, Operator::$doesNotEqual, $value);
- }
-
- /**
- * Adds a 'or where approximately equals' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereApproximatelyEquals($field, $value)
- {
- return $this->orWhere($field, Operator::$approximatelyEquals, $value);
- }
-
- /**
- * Adds an 'or where contains' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereContains($field, $value)
- {
- return $this->orWhere($field, Operator::$contains, $value);
- }
-
- /**
- * Adds an 'or where *not* contains' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereNotContains($field, $value)
- {
- return $this->orWhere($field, Operator::$notContains, $value);
- }
-
- /**
- * Adds an 'or where starts with' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereStartsWith($field, $value)
- {
- return $this->orWhere($field, Operator::$startsWith, $value);
- }
-
- /**
- * Adds an 'or where *not* starts with' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereNotStartsWith($field, $value)
- {
- return $this->orWhere($field, Operator::$notStartsWith, $value);
- }
-
- /**
- * Adds an 'or where ends with' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereEndsWith($field, $value)
- {
- return $this->orWhere($field, Operator::$endsWith, $value);
- }
-
- /**
- * Adds an 'or where *not* ends with' clause to the current query.
- *
- * @param string $field
- * @param string $value
- *
- * @return Builder
- */
- public function orWhereNotEndsWith($field, $value)
- {
- return $this->orWhere($field, Operator::$notEndsWith, $value);
- }
-
- /**
- * Adds an 'or where member of' filter to the current query.
- *
- * @param string $dn
- *
- * @return Builder
- */
- public function orWhereMemberOf($dn)
- {
- return $this->orWhereEquals($this->schema->memberOfRecursive(), $dn);
- }
-
- /**
- * Adds a filter onto the current query.
- *
- * @param string $type The type of filter to add.
- * @param array $bindings The bindings of the filter.
- *
- * @throws InvalidArgumentException
- *
- * @return $this
- */
- public function addFilter($type, array $bindings)
- {
- // Here we will ensure we have been given a proper filter type.
- if (!array_key_exists($type, $this->filters)) {
- throw new InvalidArgumentException("Invalid filter type: {$type}.");
- }
-
- // The required filter key bindings.
- $required = ['field', 'operator', 'value'];
-
- // Here we will ensure the proper key bindings are given.
- if (count(array_intersect_key(array_flip($required), $bindings)) !== count($required)) {
- // Retrieve the keys that are missing in the bindings array.
- $missing = implode(', ', array_diff($required, array_flip($bindings)));
-
- throw new InvalidArgumentException("Invalid filter bindings. Missing: {$missing} keys.");
- }
-
- $this->filters[$type][] = $bindings;
-
- return $this;
- }
-
- /**
- * Clear the query builders filters.
- *
- * @return $this
- */
- public function clearFilters()
- {
- foreach ($this->filters as $type => $filters) {
- $this->filters[$type] = [];
- }
-
- return $this;
- }
-
- /**
- * Returns true / false depending if the current object
- * contains selects.
- *
- * @return bool
- */
- public function hasSelects()
- {
- return count($this->getSelects()) > 0;
- }
-
- /**
- * Returns the current selected fields to retrieve.
- *
- * @return array
- */
- public function getSelects()
- {
- $selects = $this->columns;
-
- // If the asterisk is not provided in the selected columns, we need to
- // ensure we always select the object class and category, as these
- // are used for constructing models. The asterisk indicates that
- // we want all attributes returned for LDAP records.
- if (!in_array('*', $selects)) {
- $selects[] = $this->schema->objectCategory();
- $selects[] = $this->schema->objectClass();
- }
-
- return $selects;
- }
-
- /**
- * Sorts the LDAP search results by the specified field and direction.
- *
- * @param string $field
- * @param string $direction
- * @param int|null $flags
- *
- * @return Builder
- */
- public function sortBy($field, $direction = 'asc', $flags = null)
- {
- $this->sortByField = $field;
-
- // Normalize direction.
- $direction = strtolower($direction);
-
- if ($direction === 'asc' || $direction === 'desc') {
- $this->sortByDirection = $direction;
- }
-
- if (is_null($flags)) {
- $this->sortByFlags = SORT_NATURAL + SORT_FLAG_CASE;
- }
-
- return $this;
- }
-
- /**
- * Set the query to search on the base distinguished name.
- *
- * This will result in one record being returned.
- *
- * @return Builder
- */
- public function read()
- {
- $this->type = 'read';
-
- return $this;
- }
-
- /**
- * Set the query to search one level on the base distinguished name.
- *
- * @return Builder
- */
- public function listing()
- {
- $this->type = 'listing';
-
- return $this;
- }
-
- /**
- * Sets the query to search the entire directory on the base distinguished name.
- *
- * @return Builder
- */
- public function recursive()
- {
- $this->type = 'search';
-
- return $this;
- }
-
- /**
- * Whether to return the LDAP results in their raw format.
- *
- * @param bool $raw
- *
- * @return Builder
- */
- public function raw($raw = true)
- {
- $this->raw = (bool) $raw;
-
- return $this;
- }
-
- /**
- * Whether the current query is nested.
- *
- * @param bool $nested
- *
- * @return Builder
- */
- public function nested($nested = true)
- {
- $this->nested = (bool) $nested;
-
- return $this;
- }
-
- /**
- * Enables caching on the current query until the given date.
- *
- * If flushing is enabled, the query cache will be flushed and then re-cached.
- *
- * @param \DateTimeInterface $until When to expire the query cache.
- * @param bool $flush Whether to force-flush the query cache.
- *
- * @return $this
- */
- public function cache(\DateTimeInterface $until = null, $flush = false)
- {
- $this->caching = true;
- $this->cacheUntil = $until;
- $this->flushCache = $flush;
-
- return $this;
- }
-
- /**
- * Returns an escaped string for use in an LDAP filter.
- *
- * @param string $value
- * @param string $ignore
- * @param int $flags
- *
- * @return string
- */
- public function escape($value, $ignore = '', $flags = 0)
- {
- return ldap_escape($value, $ignore, $flags);
- }
-
- /**
- * Returns the query builders sort by field.
- *
- * @return string
- */
- public function getSortByField()
- {
- return $this->sortByField;
- }
-
- /**
- * Returns the query builders sort by direction.
- *
- * @return string
- */
- public function getSortByDirection()
- {
- return $this->sortByDirection;
- }
-
- /**
- * Returns the query builders sort by flags.
- *
- * @return int
- */
- public function getSortByFlags()
- {
- return $this->sortByFlags;
- }
-
- /**
- * Returns true / false if the current query is nested.
- *
- * @return bool
- */
- public function isNested()
- {
- return $this->nested === true;
- }
-
- /**
- * Returns bool that determines whether the current
- * query builder will return raw results.
- *
- * @return bool
- */
- public function isRaw()
- {
- return $this->raw;
- }
-
- /**
- * Returns bool that determines whether the current
- * query builder will return paginated results.
- *
- * @return bool
- */
- public function isPaginated()
- {
- return $this->paginated;
- }
-
- /**
- * Returns bool that determines whether the current
- * query builder will return sorted results.
- *
- * @return bool
- */
- public function isSorted()
- {
- return $this->sortByField ? true : false;
- }
-
- /**
- * Handle dynamic method calls on the query builder object to be directed to the query processor.
- *
- * @param string $method
- * @param array $parameters
- *
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- // We'll check if the beginning of the method being called contains
- // 'where'. If so, we'll assume it's a dynamic 'where' clause.
- if (substr($method, 0, 5) === 'where') {
- return $this->dynamicWhere($method, $parameters);
- }
-
- return call_user_func_array([$this->newProcessor(), $method], $parameters);
- }
-
- /**
- * Handles dynamic "where" clauses to the query.
- *
- * @param string $method
- * @param array $parameters
- *
- * @return Builder
- */
- public function dynamicWhere($method, $parameters)
- {
- $finder = substr($method, 5);
-
- $segments = preg_split('/(And|Or)(?=[A-Z])/', $finder, -1, PREG_SPLIT_DELIM_CAPTURE);
-
- // The connector variable will determine which connector will be used for the
- // query condition. We will change it as we come across new boolean values
- // in the dynamic method strings, which could contain a number of these.
- $connector = 'and';
-
- $index = 0;
-
- foreach ($segments as $segment) {
- // If the segment is not a boolean connector, we can assume it is a column's name
- // and we will add it to the query as a new constraint as a where clause, then
- // we can keep iterating through the dynamic method string's segments again.
- if ($segment != 'And' && $segment != 'Or') {
- $this->addDynamic($segment, $connector, $parameters, $index);
-
- $index++;
- }
-
- // Otherwise, we will store the connector so we know how the next where clause we
- // find in the query should be connected to the previous ones, meaning we will
- // have the proper boolean connector to connect the next where clause found.
- else {
- $connector = $segment;
- }
- }
-
- return $this;
- }
-
- /**
- * Adds an array of wheres to the current query.
- *
- * @param array $wheres
- * @param string $boolean
- * @param bool $raw
- *
- * @return Builder
- */
- protected function addArrayOfWheres($wheres, $boolean, $raw)
- {
- foreach ($wheres as $key => $value) {
- if (is_numeric($key) && is_array($value)) {
- // If the key is numeric and the value is an array, we'll
- // assume we've been given an array with conditionals.
- list($field, $condition) = $value;
-
- // Since a value is optional for some conditionals, we will
- // try and retrieve the third parameter from the array,
- // but is entirely optional.
- $value = Arr::get($value, 2);
-
- $this->where($field, $condition, $value, $boolean);
- } else {
- // If the value is not an array, we will assume an equals clause.
- $this->where($key, Operator::$equals, $value, $boolean, $raw);
- }
- }
-
- return $this;
- }
-
- /**
- * Add a single dynamic where clause statement to the query.
- *
- * @param string $segment
- * @param string $connector
- * @param array $parameters
- * @param int $index
- *
- * @return void
- */
- protected function addDynamic($segment, $connector, $parameters, $index)
- {
- // We'll format the 'where' boolean and field here to avoid casing issues.
- $bool = strtolower($connector);
- $field = strtolower($segment);
-
- $this->where($field, '=', $parameters[$index], $bool);
- }
-
- /**
- * Logs the given executed query information by firing its query event.
- *
- * @param Builder $query
- * @param string $type
- * @param null|float $time
- */
- protected function logQuery($query, $type, $time = null)
- {
- $args = [$query, $time];
-
- switch ($type) {
- case 'listing':
- $event = new Events\Listing(...$args);
- break;
- case 'read':
- $event = new Events\Read(...$args);
- break;
- case 'paginate':
- $event = new Events\Paginate(...$args);
- break;
- default:
- $event = new Events\Search(...$args);
- break;
- }
-
- $this->fireQueryEvent($event);
- }
-
- /**
- * Fires the given query event.
- *
- * @param QueryExecuted $event
- */
- protected function fireQueryEvent(QueryExecuted $event)
- {
- Adldap::getEventDispatcher()->fire($event);
- }
-
- /**
- * Get the elapsed time since a given starting point.
- *
- * @param int $start
- *
- * @return float
- */
- protected function getElapsedTime($start)
- {
- return round((microtime(true) - $start) * 1000, 2);
- }
-
- /**
- * Returns a new query Processor instance.
- *
- * @return Processor
- */
- protected function newProcessor()
- {
- return new Processor($this);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Cache.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Cache.php
deleted file mode 100644
index 9b0206a02..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Cache.php
+++ /dev/null
@@ -1,95 +0,0 @@
-store = $store;
- }
-
- /**
- * Get an item from the cache.
- *
- * @param string $key
- *
- * @throws \Psr\SimpleCache\InvalidArgumentException
- *
- * @return mixed
- */
- public function get($key)
- {
- return $this->store->get($key);
- }
-
- /**
- * Store an item in the cache.
- *
- * @param string $key
- * @param mixed $value
- * @param \DateTimeInterface|\DateInterval|int|null $ttl
- *
- * @throws \Psr\SimpleCache\InvalidArgumentException
- *
- * @return bool
- */
- public function put($key, $value, $ttl = null)
- {
- return $this->store->set($key, $value, $ttl);
- }
-
- /**
- * Get an item from the cache, or execute the given Closure and store the result.
- *
- * @param string $key
- * @param \DateTimeInterface|\DateInterval|int|null $ttl
- * @param Closure $callback
- *
- * @throws \Psr\SimpleCache\InvalidArgumentException
- *
- * @return mixed
- */
- public function remember($key, $ttl, Closure $callback)
- {
- $value = $this->get($key);
-
- if (!is_null($value)) {
- return $value;
- }
-
- $this->put($key, $value = $callback(), $ttl);
-
- return $value;
- }
-
- /**
- * Delete an item from the cache.
- *
- * @param string $key
- *
- * @throws \Psr\Cache\InvalidArgumentException
- * @throws \Psr\SimpleCache\InvalidArgumentException
- *
- * @return bool
- */
- public function delete($key)
- {
- return $this->store->delete($key);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Collection.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Collection.php
deleted file mode 100644
index b9b6616ef..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Collection.php
+++ /dev/null
@@ -1,27 +0,0 @@
-useAsCallable($value)) {
- return $value;
- }
-
- return function ($item) use ($value) {
- if ($item instanceof Model) {
- return $item->getFirstAttribute($value);
- }
-
- return data_get($item, $value);
- };
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Events/Listing.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Events/Listing.php
deleted file mode 100644
index 0ca05b77a..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Events/Listing.php
+++ /dev/null
@@ -1,8 +0,0 @@
-query = $query;
- $this->time = $time;
- }
-
- /**
- * Returns the LDAP filter that was used for the query.
- *
- * @return Builder
- */
- public function getQuery()
- {
- return $this->query;
- }
-
- /**
- * Returns the number of milliseconds it took to execute the query.
- *
- * @return float|null
- */
- public function getTime()
- {
- return $this->time;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Events/Read.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Events/Read.php
deleted file mode 100644
index 4e0e65de9..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Events/Read.php
+++ /dev/null
@@ -1,8 +0,0 @@
-setConnection($connection)
- ->setSchema($schema)
- ->setBaseDn($baseDn);
- }
-
- /**
- * Sets the connection property.
- *
- * @param ConnectionInterface $connection
- *
- * @return $this
- */
- public function setConnection(ConnectionInterface $connection)
- {
- $this->connection = $connection;
-
- return $this;
- }
-
- /**
- * Sets the schema property.
- *
- * @param SchemaInterface|null $schema
- *
- * @return $this
- */
- public function setSchema(SchemaInterface $schema = null)
- {
- $this->schema = $schema ?: new ActiveDirectory();
-
- return $this;
- }
-
- /**
- * Sets the base distinguished name to perform searches upon.
- *
- * @param string $base
- *
- * @return $this
- */
- public function setBaseDn($base = '')
- {
- $this->base = $base;
-
- return $this;
- }
-
- /**
- * Sets the cache for storing query results.
- *
- * @param Cache $cache
- *
- * @return $this
- */
- public function setCache(Cache $cache)
- {
- $this->cache = $cache;
-
- return $this;
- }
-
- /**
- * Returns a new query builder instance.
- *
- * @return Builder
- */
- public function newQuery()
- {
- return $this->newBuilder()->in($this->base);
- }
-
- /**
- * Performs a global 'all' search query on the current
- * connection by performing a search for all entries
- * that contain a common name attribute.
- *
- * @return \Adldap\Query\Collection|array
- */
- public function get()
- {
- return $this->newQuery()->whereHas($this->schema->commonName())->get();
- }
-
- /**
- * Returns a query builder scoped to users.
- *
- * @return Builder
- */
- public function users()
- {
- $wheres = [
- [$this->schema->objectClass(), Operator::$equals, $this->schema->objectClassUser()],
- [$this->schema->objectCategory(), Operator::$equals, $this->schema->objectCategoryPerson()],
- ];
-
- // OpenLDAP doesn't like specifying the omission of user objectclasses
- // equal to `contact`. We'll make sure we're working with
- // ActiveDirectory before adding this filter.
- if (is_a($this->schema, ActiveDirectory::class)) {
- $wheres[] = [$this->schema->objectClass(), Operator::$doesNotEqual, $this->schema->objectClassContact()];
- }
-
- return $this->where($wheres);
- }
-
- /**
- * Returns a query builder scoped to printers.
- *
- * @return Builder
- */
- public function printers()
- {
- return $this->where([
- $this->schema->objectClass() => $this->schema->objectClassPrinter(),
- ]);
- }
-
- /**
- * Returns a query builder scoped to organizational units.
- *
- * @return Builder
- */
- public function ous()
- {
- return $this->where([
- $this->schema->objectClass() => $this->schema->objectClassOu(),
- ]);
- }
-
- /**
- * Returns a query builder scoped to organizations.
- *
- * @return Builder
- */
- public function organizations()
- {
- return $this->where([
- $this->schema->objectClass() => $this->schema->objectClassOrganization(),
- ]);
- }
-
- /**
- * Returns a query builder scoped to groups.
- *
- * @return Builder
- */
- public function groups()
- {
- return $this->where([
- $this->schema->objectClass() => $this->schema->objectClassGroup(),
- ]);
- }
-
- /**
- * Returns a query builder scoped to containers.
- *
- * @return Builder
- */
- public function containers()
- {
- return $this->where([
- $this->schema->objectClass() => $this->schema->objectClassContainer(),
- ]);
- }
-
- /**
- * Returns a query builder scoped to contacts.
- *
- * @return Builder
- */
- public function contacts()
- {
- return $this->where([
- $this->schema->objectClass() => $this->schema->objectClassContact(),
- ]);
- }
-
- /**
- * Returns a query builder scoped to computers.
- *
- * @return Builder
- */
- public function computers()
- {
- return $this->where([
- $this->schema->objectClass() => $this->schema->objectClassComputer(),
- ]);
- }
-
- /**
- * Returns the root DSE record.
- *
- * @return RootDse|null
- */
- public function getRootDse()
- {
- $query = $this->newQuery();
-
- $root = $query->in('')->read()->whereHas($this->schema->objectClass())->first();
-
- if ($root) {
- return (new RootDse([], $query))
- ->setRawAttributes($root->getAttributes());
- }
- }
-
- /**
- * Handle dynamic method calls on the query builder object.
- *
- * @param string $method
- * @param array $parameters
- *
- * @return mixed
- */
- public function __call($method, $parameters)
- {
- return call_user_func_array([$this->newQuery(), $method], $parameters);
- }
-
- /**
- * Returns a new query grammar instance.
- *
- * @return Grammar
- */
- protected function newGrammar()
- {
- return new Grammar();
- }
-
- /**
- * Returns a new query builder instance.
- *
- * @return Builder
- */
- protected function newBuilder()
- {
- $builder = new Builder($this->connection, $this->newGrammar(), $this->schema);
-
- $builder->setCache($this->cache);
-
- return $builder;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Grammar.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Grammar.php
deleted file mode 100644
index dcda3d733..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Grammar.php
+++ /dev/null
@@ -1,390 +0,0 @@
-filters['and'];
- $ors = $builder->filters['or'];
- $raws = $builder->filters['raw'];
-
- $query = $this->concatenate($raws);
-
- $query = $this->compileWheres($ands, $query);
-
- $query = $this->compileOrWheres($ors, $query);
-
- // We need to check if the query is already nested, otherwise
- // we'll nest it here and return the result.
- if (!$builder->isNested()) {
- $total = count($ands) + count($raws);
-
- // Make sure we wrap the query in an 'and' if using
- // multiple filters. We also need to check if only
- // one where is used with multiple orWheres, that
- // we wrap it in an `and` query.
- if ($total > 1 || (count($ands) === 1 && count($ors) > 0)) {
- $query = $this->compileAnd($query);
- }
- }
-
- return $query;
- }
-
- /**
- * Concatenates filters into a single string.
- *
- * @param array $bindings
- *
- * @return string
- */
- public function concatenate(array $bindings = [])
- {
- // Filter out empty query segments.
- $bindings = array_filter($bindings, function ($value) {
- return (string) $value !== '';
- });
-
- return implode('', $bindings);
- }
-
- /**
- * Returns a query string for equals.
- *
- * Produces: (field=value)
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileEquals($field, $value)
- {
- return $this->wrap($field.Operator::$equals.$value);
- }
-
- /**
- * Returns a query string for does not equal.
- *
- * Produces: (!(field=value))
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileDoesNotEqual($field, $value)
- {
- return $this->compileNot($this->compileEquals($field, $value));
- }
-
- /**
- * Alias for does not equal operator (!=) operator.
- *
- * Produces: (!(field=value))
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileDoesNotEqualAlias($field, $value)
- {
- return $this->compileDoesNotEqual($field, $value);
- }
-
- /**
- * Returns a query string for greater than or equals.
- *
- * Produces: (field>=value)
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileGreaterThanOrEquals($field, $value)
- {
- return $this->wrap($field.Operator::$greaterThanOrEquals.$value);
- }
-
- /**
- * Returns a query string for less than or equals.
- *
- * Produces: (field<=value)
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileLessThanOrEquals($field, $value)
- {
- return $this->wrap($field.Operator::$lessThanOrEquals.$value);
- }
-
- /**
- * Returns a query string for approximately equals.
- *
- * Produces: (field~=value)
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileApproximatelyEquals($field, $value)
- {
- return $this->wrap($field.Operator::$approximatelyEquals.$value);
- }
-
- /**
- * Returns a query string for starts with.
- *
- * Produces: (field=value*)
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileStartsWith($field, $value)
- {
- return $this->wrap($field.Operator::$equals.$value.Operator::$has);
- }
-
- /**
- * Returns a query string for does not start with.
- *
- * Produces: (!(field=*value))
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileNotStartsWith($field, $value)
- {
- return $this->compileNot($this->compileStartsWith($field, $value));
- }
-
- /**
- * Returns a query string for ends with.
- *
- * Produces: (field=*value)
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileEndsWith($field, $value)
- {
- return $this->wrap($field.Operator::$equals.Operator::$has.$value);
- }
-
- /**
- * Returns a query string for does not end with.
- *
- * Produces: (!(field=value*))
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileNotEndsWith($field, $value)
- {
- return $this->compileNot($this->compileEndsWith($field, $value));
- }
-
- /**
- * Returns a query string for contains.
- *
- * Produces: (field=*value*)
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileContains($field, $value)
- {
- return $this->wrap($field.Operator::$equals.Operator::$has.$value.Operator::$has);
- }
-
- /**
- * Returns a query string for does not contain.
- *
- * Produces: (!(field=*value*))
- *
- * @param string $field
- * @param string $value
- *
- * @return string
- */
- public function compileNotContains($field, $value)
- {
- return $this->compileNot($this->compileContains($field, $value));
- }
-
- /**
- * Returns a query string for a where has.
- *
- * Produces: (field=*)
- *
- * @param string $field
- *
- * @return string
- */
- public function compileHas($field)
- {
- return $this->wrap($field.Operator::$equals.Operator::$has);
- }
-
- /**
- * Returns a query string for a where does not have.
- *
- * Produces: (!(field=*))
- *
- * @param string $field
- *
- * @return string
- */
- public function compileNotHas($field)
- {
- return $this->compileNot($this->compileHas($field));
- }
-
- /**
- * Wraps the inserted query inside an AND operator.
- *
- * Produces: (&query)
- *
- * @param string $query
- *
- * @return string
- */
- public function compileAnd($query)
- {
- return $query ? $this->wrap($query, '(&') : '';
- }
-
- /**
- * Wraps the inserted query inside an OR operator.
- *
- * Produces: (|query)
- *
- * @param string $query
- *
- * @return string
- */
- public function compileOr($query)
- {
- return $query ? $this->wrap($query, '(|') : '';
- }
-
- /**
- * Wraps the inserted query inside an NOT operator.
- *
- * @param string $query
- *
- * @return string
- */
- public function compileNot($query)
- {
- return $query ? $this->wrap($query, '(!') : '';
- }
-
- /**
- * Assembles all where clauses in the current wheres property.
- *
- * @param array $wheres
- * @param string $query
- *
- * @return string
- */
- protected function compileWheres(array $wheres = [], $query = '')
- {
- foreach ($wheres as $where) {
- $query .= $this->compileWhere($where);
- }
-
- return $query;
- }
-
- /**
- * Assembles all or where clauses in the current orWheres property.
- *
- * @param array $orWheres
- * @param string $query
- *
- * @return string
- */
- protected function compileOrWheres(array $orWheres = [], $query = '')
- {
- $or = '';
-
- foreach ($orWheres as $where) {
- $or .= $this->compileWhere($where);
- }
-
- // Make sure we wrap the query in an 'or' if using multiple
- // orWheres. For example (|(QUERY)(ORWHEREQUERY)).
- if (($query && count($orWheres) > 0) || count($orWheres) > 1) {
- $query .= $this->compileOr($or);
- } else {
- $query .= $or;
- }
-
- return $query;
- }
-
- /**
- * Assembles a single where query based
- * on its operator and returns it.
- *
- * @param array $where
- *
- * @return string|null
- */
- protected function compileWhere(array $where)
- {
- // Get the name of the operator.
- if ($name = array_search($where['operator'], Operator::all())) {
- // If the name was found we'll camel case it
- // to run it through the compile method.
- $method = 'compile'.ucfirst($name);
-
- // Make sure the compile method exists for the operator.
- if (method_exists($this, $method)) {
- return $this->{$method}($where['field'], $where['value']);
- }
- }
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Operator.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Operator.php
deleted file mode 100644
index 75b32890b..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Operator.php
+++ /dev/null
@@ -1,116 +0,0 @@
-=';
-
- /**
- * The less than or equal to operator.
- *
- * @var string
- */
- public static $lessThanOrEquals = '<=';
-
- /**
- * The approximately equal to operator.
- *
- * @var string
- */
- public static $approximatelyEquals = '~=';
-
- /**
- * The custom starts with operator.
- *
- * @var string
- */
- public static $startsWith = 'starts_with';
-
- /**
- * The custom not starts with operator.
- *
- * @var string
- */
- public static $notStartsWith = 'not_starts_with';
-
- /**
- * The custom ends with operator.
- *
- * @var string
- */
- public static $endsWith = 'ends_with';
-
- /**
- * The custom not ends with operator.
- *
- * @var string
- */
- public static $notEndsWith = 'not_ends_with';
-
- /**
- * The custom contains operator.
- *
- * @var string
- */
- public static $contains = 'contains';
-
- /**
- * The custom not contains operator.
- *
- * @var string
- */
- public static $notContains = 'not_contains';
-
- /**
- * Returns all available operators.
- *
- * @return array
- */
- public static function all()
- {
- return (new ReflectionClass(new static()))->getStaticProperties();
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Paginator.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Paginator.php
deleted file mode 100644
index 0f61fe232..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Paginator.php
+++ /dev/null
@@ -1,206 +0,0 @@
-setResults($results)
- ->setPerPage($perPage)
- ->setCurrentPage($currentPage)
- ->setPages($pages)
- ->setCurrentOffset(($this->getCurrentPage() * $this->getPerPage()));
- }
-
- /**
- * Get an iterator for the entries.
- *
- * @return ArrayIterator
- */
- public function getIterator()
- {
- $entries = array_slice($this->getResults(), $this->getCurrentOffset(), $this->getPerPage(), true);
-
- return new ArrayIterator($entries);
- }
-
- /**
- * Returns the complete results array.
- *
- * @return array
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * Returns the total amount of pages
- * in a paginated result.
- *
- * @return int
- */
- public function getPages()
- {
- return $this->pages;
- }
-
- /**
- * Returns the total amount of entries
- * allowed per page.
- *
- * @return int
- */
- public function getPerPage()
- {
- return $this->perPage;
- }
-
- /**
- * Returns the current page number.
- *
- * @return int
- */
- public function getCurrentPage()
- {
- return $this->currentPage;
- }
-
- /**
- * Returns the current offset number.
- *
- * @return int
- */
- public function getCurrentOffset()
- {
- return $this->currentOffset;
- }
-
- /**
- * Returns the total amount of results.
- *
- * @return int
- */
- public function count()
- {
- return count($this->results);
- }
-
- /**
- * Sets the results array property.
- *
- * @param array $results
- *
- * @return Paginator
- */
- protected function setResults(array $results)
- {
- $this->results = $results;
-
- return $this;
- }
-
- /**
- * Sets the total number of pages.
- *
- * @param int $pages
- *
- * @return Paginator
- */
- protected function setPages($pages = 0)
- {
- $this->pages = (int) $pages;
-
- return $this;
- }
-
- /**
- * Sets the number of entries per page.
- *
- * @param int $perPage
- *
- * @return Paginator
- */
- protected function setPerPage($perPage = 50)
- {
- $this->perPage = (int) $perPage;
-
- return $this;
- }
-
- /**
- * Sets the current page number.
- *
- * @param int $currentPage
- *
- * @return Paginator
- */
- protected function setCurrentPage($currentPage = 0)
- {
- $this->currentPage = (int) $currentPage;
-
- return $this;
- }
-
- /**
- * Sets the current offset number.
- *
- * @param int $offset
- *
- * @return Paginator
- */
- protected function setCurrentOffset($offset = 0)
- {
- $this->currentOffset = (int) $offset;
-
- return $this;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Processor.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Processor.php
deleted file mode 100644
index e4e5329c1..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Query/Processor.php
+++ /dev/null
@@ -1,211 +0,0 @@
-builder = $builder;
- $this->schema = $builder->getSchema();
- $this->connection = $builder->getConnection();
- }
-
- /**
- * Processes LDAP search results and constructs their model instances.
- *
- * @param array $entries The LDAP entries to process.
- *
- * @return Collection|array
- */
- public function process($entries)
- {
- if ($this->builder->isRaw()) {
- // If the builder is asking for a raw
- // LDAP result, we can return here.
- return $entries;
- }
-
- $models = [];
-
- if (array_key_exists('count', $entries)) {
- for ($i = 0; $i < $entries['count']; $i++) {
- // We'll go through each entry and construct a new
- // model instance with the raw LDAP attributes.
- $models[] = $this->newLdapEntry($entries[$i]);
- }
- }
-
- // If the query contains paginated results, we'll return them here.
- if ($this->builder->isPaginated()) {
- return $models;
- }
-
- // If the query is requested to be sorted, we'll perform
- // that here and return the resulting collection.
- if ($this->builder->isSorted()) {
- return $this->processSort($models);
- }
-
- // Otherwise, we'll return a regular unsorted collection.
- return $this->newCollection($models);
- }
-
- /**
- * Processes paginated LDAP results.
- *
- * @param array $pages
- * @param int $perPage
- * @param int $currentPage
- *
- * @return Paginator
- */
- public function processPaginated(array $pages = [], $perPage = 50, $currentPage = 0)
- {
- $models = [];
-
- foreach ($pages as $entries) {
- // Go through each page and process the results into an objects array.
- $models = array_merge($models, $this->process($entries));
- }
-
- $models = $this->processSort($models)->toArray();
-
- return $this->newPaginator($models, $perPage, $currentPage, count($pages));
- }
-
- /**
- * Returns a new LDAP Entry instance.
- *
- * @param array $attributes
- *
- * @return Entry
- */
- public function newLdapEntry(array $attributes = [])
- {
- $objectClass = $this->schema->objectClass();
-
- // We need to ensure the record contains an object class to be able to
- // determine its type. Otherwise, we create a default Entry model.
- if (array_key_exists($objectClass, $attributes) && array_key_exists(0, $attributes[$objectClass])) {
- // Retrieve all of the object classes from the LDAP
- // entry and lowercase them for comparisons.
- $classes = array_map('strtolower', $attributes[$objectClass]);
-
- // Retrieve the model mapping.
- $models = $this->schema->objectClassModelMap();
-
- // Retrieve the object class mappings (with strtolower keys).
- $mappings = array_map('strtolower', array_keys($models));
-
- // Retrieve the model from the map using the entry's object class.
- $map = array_intersect($mappings, $classes);
-
- if (count($map) > 0) {
- // Retrieve the model using the object class.
- $model = $models[current($map)];
-
- // Construct and return a new model.
- return $this->newModel([], $model)
- ->setRawAttributes($attributes);
- }
- }
-
- // A default entry model if the object class isn't found.
- return $this->newModel()->setRawAttributes($attributes);
- }
-
- /**
- * Creates a new model instance.
- *
- * @param array $attributes
- * @param string|null $model
- *
- * @throws InvalidArgumentException
- *
- * @return mixed|Entry
- */
- public function newModel($attributes = [], $model = null)
- {
- $model = (class_exists($model) ? $model : $this->schema->entryModel());
-
- if (!is_subclass_of($model, $base = Model::class)) {
- throw new InvalidArgumentException("The given model class '{$model}' must extend the base model class '{$base}'");
- }
-
- return new $model($attributes, $this->builder->newInstance());
- }
-
- /**
- * Returns a new Paginator object instance.
- *
- * @param array $models
- * @param int $perPage
- * @param int $currentPage
- * @param int $pages
- *
- * @return Paginator
- */
- public function newPaginator(array $models = [], $perPage = 25, $currentPage = 0, $pages = 1)
- {
- return new Paginator($models, $perPage, $currentPage, $pages);
- }
-
- /**
- * Returns a new collection instance.
- *
- * @param array $items
- *
- * @return Collection
- */
- public function newCollection(array $items = [])
- {
- return new Collection($items);
- }
-
- /**
- * Sorts LDAP search results.
- *
- * @param array $models
- *
- * @return Collection
- */
- protected function processSort(array $models = [])
- {
- $field = $this->builder->getSortByField();
-
- $flags = $this->builder->getSortByFlags();
-
- $direction = $this->builder->getSortByDirection();
-
- $desc = ($direction === 'desc' ? true : false);
-
- return $this->newCollection($models)->sortBy($field, $flags, $desc);
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/ActiveDirectory.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/ActiveDirectory.php
deleted file mode 100644
index 09f03149e..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/ActiveDirectory.php
+++ /dev/null
@@ -1,94 +0,0 @@
-lockoutTime());
- }
-
- /**
- * {@inheritdoc}
- */
- public function filterDisabled()
- {
- return sprintf('(%s=*)', $this->lockoutTime());
- }
-
- /**
- * {@inheritdoc}
- */
- public function lockoutTime()
- {
- return 'pwdAccountLockedTime';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategory()
- {
- return 'objectclass';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassGroup()
- {
- return 'groupofnames';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassOu()
- {
- return 'organizationalUnit';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassPerson()
- {
- return 'inetorgperson';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassUser()
- {
- return 'inetorgperson';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectGuid()
- {
- return 'nsuniqueid';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectGuidRequiresConversion()
- {
- return false;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/EDirectory.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/EDirectory.php
deleted file mode 100644
index db3101171..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/EDirectory.php
+++ /dev/null
@@ -1,110 +0,0 @@
-lockoutTime());
- }
-
- /**
- * {@inheritdoc}
- */
- public function filterDisabled()
- {
- return sprintf('(%s=*)', $this->lockoutTime());
- }
-
- /**
- * {@inheritdoc}
- */
- public function lockoutTime()
- {
- return 'pwdAccountLockedTime';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategory()
- {
- return 'objectclass';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassGroup()
- {
- return 'groupofnames';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassOu()
- {
- return 'organizationalUnit';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassPerson()
- {
- return 'inetorgperson';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassUser()
- {
- return 'inetorgperson';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectGuid()
- {
- return 'guid';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectGuidRequiresConversion()
- {
- return false;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/FreeIPA.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/FreeIPA.php
deleted file mode 100644
index 410f6f920..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/FreeIPA.php
+++ /dev/null
@@ -1,126 +0,0 @@
-lockoutTime());
- }
-
- /**
- * {@inheritdoc}
- */
- public function filterDisabled()
- {
- return sprintf('(%s=*)', $this->lockoutTime());
- }
-
- /**
- * {@inheritdoc}
- */
- public function lockoutTime()
- {
- return 'pwdAccountLockedTime';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategory()
- {
- return 'objectclass';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassGroup()
- {
- return 'groupofnames';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassOu()
- {
- return 'organizationalUnit';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassPerson()
- {
- return 'inetorgperson';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassUser()
- {
- return 'inetorgperson';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectGuid()
- {
- return 'entryuuid';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectGuidRequiresConversion()
- {
- return false;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/Schema.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/Schema.php
deleted file mode 100644
index ac7645238..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/Schema.php
+++ /dev/null
@@ -1,1264 +0,0 @@
-member().";range={$from}-{$to}";
- }
-
- /**
- * {@inheritdoc}
- */
- public function messageTrackingEnabled()
- {
- return 'messagetrackingenabled';
- }
-
- /**
- * {@inheritdoc}
- */
- public function msExchangeServer()
- {
- return 'ms-exch-exchange-server';
- }
-
- /**
- * {@inheritdoc}
- */
- public function name()
- {
- return 'name';
- }
-
- /**
- * {@inheritdoc}
- */
- public function neverExpiresDate()
- {
- return '9223372036854775807';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryComputer()
- {
- return 'computer';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryContainer()
- {
- return 'container';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryExchangePrivateMdb()
- {
- return 'msexchprivatemdb';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryExchangeServer()
- {
- return 'msExchExchangeServer';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryExchangeStorageGroup()
- {
- return 'msExchStorageGroup';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryGroup()
- {
- return 'group';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryOrganizationalUnit()
- {
- return 'organizational-unit';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryPerson()
- {
- return 'person';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectCategoryPrinter()
- {
- return 'print-queue';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClass()
- {
- return 'objectclass';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassComputer()
- {
- return 'computer';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassContact()
- {
- return 'contact';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassContainer()
- {
- return 'container';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassOrganization()
- {
- return 'organization';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassPrinter()
- {
- return 'printqueue';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassUser()
- {
- return 'user';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassForeignSecurityPrincipal()
- {
- return 'foreignsecurityprincipal';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectClassModelMap()
- {
- return [
- $this->objectClassComputer() => $this->computerModel(),
- $this->objectClassContact() => $this->contactModel(),
- $this->objectClassPerson() => $this->userModel(),
- $this->objectClassGroup() => $this->groupModel(),
- $this->objectClassContainer() => $this->containerModel(),
- $this->objectClassPrinter() => $this->printerModel(),
- $this->objectClassOrganization() => $this->organizationModel(),
- $this->objectClassOu() => $this->organizationalUnitModel(),
- $this->objectClassForeignSecurityPrincipal() => $this->foreignSecurityPrincipalModel(),
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectSid()
- {
- return 'objectsid';
- }
-
- /**
- * {@inheritdoc}
- */
- public function objectSidRequiresConversion()
- {
- return true;
- }
-
- /**
- * {@inheritdoc}
- */
- public function operatingSystem()
- {
- return 'operatingsystem';
- }
-
- /**
- * {@inheritdoc}
- */
- public function operatingSystemServicePack()
- {
- return 'operatingsystemservicepack';
- }
-
- /**
- * {@inheritdoc}
- */
- public function operatingSystemVersion()
- {
- return 'operatingsystemversion';
- }
-
- /**
- * {@inheritdoc}
- */
- public function organization()
- {
- return 'organization';
- }
-
- /**
- * {@inheritdoc}
- */
- public function organizationName()
- {
- return 'o';
- }
-
- /**
- * {@inheritdoc}
- */
- public function organizationalPerson()
- {
- return 'organizationalperson';
- }
-
- /**
- * {@inheritdoc}
- */
- public function organizationalUnit()
- {
- return 'organizationalunit';
- }
-
- /**
- * {@inheritdoc}
- */
- public function organizationalUnitModel()
- {
- return OrganizationalUnit::class;
- }
-
- /**
- * {@inheritdoc}
- */
- public function organizationModel()
- {
- return Organization::class;
- }
-
- /**
- * {@inheritdoc}
- */
- public function organizationalUnitShort()
- {
- return 'ou';
- }
-
- /**
- * {@inheritdoc}
- */
- public function otherMailbox()
- {
- return 'othermailbox';
- }
-
- /**
- * {@inheritdoc}
- */
- public function passwordLastSet()
- {
- return 'pwdlastset';
- }
-
- /**
- * {@inheritdoc}
- */
- public function person()
- {
- return 'person';
- }
-
- /**
- * {@inheritdoc}
- */
- public function personalTitle()
- {
- return 'personaltitle';
- }
-
- /**
- * {@inheritdoc}
- */
- public function physicalDeliveryOfficeName()
- {
- return 'physicaldeliveryofficename';
- }
-
- /**
- * {@inheritdoc}
- */
- public function portName()
- {
- return 'portname';
- }
-
- /**
- * {@inheritdoc}
- */
- public function postalCode()
- {
- return 'postalcode';
- }
-
- /**
- * {@inheritdoc}
- */
- public function postOfficeBox()
- {
- return 'postofficebox';
- }
-
- /**
- * {@inheritdoc}
- */
- public function primaryGroupId()
- {
- return 'primarygroupid';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerBinNames()
- {
- return 'printbinnames';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerColorSupported()
- {
- return 'printcolor';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerDuplexSupported()
- {
- return 'printduplexsupported';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerEndTime()
- {
- return 'printendtime';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerMaxResolutionSupported()
- {
- return 'printmaxresolutionsupported';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerMediaSupported()
- {
- return 'printmediasupported';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerMemory()
- {
- return 'printmemory';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerModel()
- {
- return Printer::class;
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerName()
- {
- return 'printername';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerOrientationSupported()
- {
- return 'printorientationssupported';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerPrintRate()
- {
- return 'printrate';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerPrintRateUnit()
- {
- return 'printrateunit';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerShareName()
- {
- return 'printsharename';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerStaplingSupported()
- {
- return 'printstaplingsupported';
- }
-
- /**
- * {@inheritdoc}
- */
- public function printerStartTime()
- {
- return 'printstarttime';
- }
-
- /**
- * {@inheritdoc}
- */
- public function priority()
- {
- return 'priority';
- }
-
- /**
- * {@inheritdoc}
- */
- public function profilePath()
- {
- return 'profilepath';
- }
-
- /**
- * {@inheritdoc}
- */
- public function proxyAddresses()
- {
- return 'proxyaddresses';
- }
-
- /**
- * {@inheritdoc}
- */
- public function roomNumber()
- {
- return 'roomnumber';
- }
-
- /**
- * {@inheritdoc}
- */
- public function rootDomainNamingContext()
- {
- return 'rootdomainnamingcontext';
- }
-
- /**
- * {@inheritdoc}
- */
- public function schemaNamingContext()
- {
- return 'schemanamingcontext';
- }
-
- /**
- * {@inheritdoc}
- */
- public function scriptPath()
- {
- return 'scriptpath';
- }
-
- /**
- * {@inheritdoc}
- */
- public function serialNumber()
- {
- return 'serialnumber';
- }
-
- /**
- * {@inheritdoc}
- */
- public function serverName()
- {
- return 'servername';
- }
-
- /**
- * {@inheritdoc}
- */
- public function showInAddressBook()
- {
- return 'showinaddressbook';
- }
-
- /**
- * {@inheritdoc}
- */
- public function street()
- {
- return 'street';
- }
-
- /**
- * {@inheritdoc}
- */
- public function streetAddress()
- {
- return 'streetaddress';
- }
-
- /**
- * {@inheritdoc}
- */
- public function systemFlags()
- {
- return 'systemflags';
- }
-
- /**
- * {@inheritdoc}
- */
- public function telephone()
- {
- return 'telephonenumber';
- }
-
- /**
- * {@inheritdoc}
- */
- public function mobile()
- {
- return 'mobile';
- }
-
- /**
- * {@inheritdoc}
- */
- public function otherMobile()
- {
- return 'othermobile';
- }
-
- /**
- * {@inheritdoc}
- */
- public function facsimile()
- {
- return 'facsimiletelephonenumber';
- }
-
- /**
- * {@inheritdoc}
- */
- public function thumbnail()
- {
- return 'thumbnailphoto';
- }
-
- /**
- * {@inheritdoc}
- */
- public function title()
- {
- return 'title';
- }
-
- /**
- * {@inheritdoc}
- */
- public function top()
- {
- return 'top';
- }
-
- /**
- * {@inheritdoc}
- */
- public function true()
- {
- return 'TRUE';
- }
-
- /**
- * {@inheritdoc}
- */
- public function unicodePassword()
- {
- return 'unicodepwd';
- }
-
- /**
- * {@inheritdoc}
- */
- public function updatedAt()
- {
- return 'whenchanged';
- }
-
- /**
- * {@inheritdoc}
- */
- public function url()
- {
- return 'url';
- }
-
- /**
- * {@inheritdoc}
- */
- public function user()
- {
- return 'user';
- }
-
- /**
- * {@inheritdoc}
- */
- public function userAccountControl()
- {
- return 'useraccountcontrol';
- }
-
- /**
- * {@inheritdoc}
- */
- public function userId()
- {
- return 'uid';
- }
-
- /**
- * {@inheritdoc}
- */
- public function userModel()
- {
- return User::class;
- }
-
- /**
- * {@inheritdoc}
- */
- public function userObjectClasses(): array
- {
- return [
- $this->top(),
- $this->person(),
- $this->organizationalPerson(),
- $this->objectClassUser(),
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function userPrincipalName()
- {
- return 'userprincipalname';
- }
-
- /**
- * {@inheritdoc}
- */
- public function userWorkstations()
- {
- return 'userworkstations';
- }
-
- /**
- * {@inheritdoc}
- */
- public function versionNumber()
- {
- return 'versionnumber';
- }
-
- /**
- * {@inheritdoc}
- */
- public function foreignSecurityPrincipalModel()
- {
- return ForeignSecurityPrincipal::class;
- }
-}
diff --git a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/SchemaInterface.php b/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/SchemaInterface.php
deleted file mode 100644
index 023df74df..000000000
--- a/data/web/inc/lib/vendor/adldap2/adldap2/src/Schemas/SchemaInterface.php
+++ /dev/null
@@ -1,1421 +0,0 @@
- $value) {
- $dn[$rdn] = self::unescape($value);
- }
- }
-
- return $dn;
- }
-
- /**
- * Un-escapes a hexadecimal string into
- * its original string representation.
- *
- * @param string $value
- *
- * @return string
- */
- public static function unescape($value)
- {
- return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function ($matches) {
- return chr(hexdec($matches[1]));
- }, $value);
- }
-
- /**
- * Convert a binary SID to a string SID.
- *
- * @author Chad Sikorra
- *
- * @link https://github.com/ChadSikorra
- * @link https://stackoverflow.com/questions/39533560/php-ldap-get-user-sid
- *
- * @param string $value The Binary SID
- *
- * @return string|null
- */
- public static function binarySidToString($value)
- {
- // Revision - 8bit unsigned int (C1)
- // Count - 8bit unsigned int (C1)
- // 2 null bytes
- // ID - 32bit unsigned long, big-endian order
- $sid = @unpack('C1rev/C1count/x2/N1id', $value);
-
- if (!isset($sid['id']) || !isset($sid['rev'])) {
- return;
- }
-
- $revisionLevel = $sid['rev'];
-
- $identifierAuthority = $sid['id'];
-
- $subs = isset($sid['count']) ? $sid['count'] : 0;
-
- $sidHex = $subs ? bin2hex($value) : '';
-
- $subAuthorities = [];
-
- // The sub-authorities depend on the count, so only get as
- // many as the count, regardless of data beyond it.
- for ($i = 0; $i < $subs; $i++) {
- $data = implode('', array_reverse(
- str_split(
- substr($sidHex, 16 + ($i * 8), 8),
- 2
- )
- ));
-
- $subAuthorities[] = hexdec($data);
- }
-
- // Tack on the 'S-' and glue it all together...
- return 'S-'.$revisionLevel.'-'.$identifierAuthority.implode(
- preg_filter('/^/', '-', $subAuthorities)
- );
- }
-
- /**
- * Convert a binary GUID to a string GUID.
- *
- * @param string $binGuid
- *
- * @return string|null
- */
- public static function binaryGuidToString($binGuid)
- {
- if (trim($binGuid) == '' || is_null($binGuid)) {
- return;
- }
-
- $hex = unpack('H*hex', $binGuid)['hex'];
-
- $hex1 = substr($hex, -26, 2).substr($hex, -28, 2).substr($hex, -30, 2).substr($hex, -32, 2);
- $hex2 = substr($hex, -22, 2).substr($hex, -24, 2);
- $hex3 = substr($hex, -18, 2).substr($hex, -20, 2);
- $hex4 = substr($hex, -16, 4);
- $hex5 = substr($hex, -12, 12);
-
- $guid = sprintf('%s-%s-%s-%s-%s', $hex1, $hex2, $hex3, $hex4, $hex5);
-
- return $guid;
- }
-
- /**
- * Converts a string GUID to it's hex variant.
- *
- * @param string $string
- *
- * @return string
- */
- public static function stringGuidToHex($string)
- {
- $hex = '\\'.substr($string, 6, 2).'\\'.substr($string, 4, 2).'\\'.substr($string, 2, 2).'\\'.substr($string, 0, 2);
- $hex = $hex.'\\'.substr($string, 11, 2).'\\'.substr($string, 9, 2);
- $hex = $hex.'\\'.substr($string, 16, 2).'\\'.substr($string, 14, 2);
- $hex = $hex.'\\'.substr($string, 19, 2).'\\'.substr($string, 21, 2);
- $hex = $hex.'\\'.substr($string, 24, 2).'\\'.substr($string, 26, 2).'\\'.substr($string, 28, 2).'\\'.substr($string, 30, 2).'\\'.substr($string, 32, 2).'\\'.substr($string, 34, 2);
-
- return $hex;
- }
-
- /**
- * Encode a password for transmission over LDAP.
- *
- * @param string $password The password to encode
- *
- * @return string
- */
- public static function encodePassword($password)
- {
- return iconv('UTF-8', 'UTF-16LE', '"'.$password.'"');
- }
-
- /**
- * Salt and hash a password to make its SSHA OpenLDAP version.
- *
- * @param string $password The password to create
- *
- * @return string
- */
- public static function makeSSHAPassword($password)
- {
- mt_srand((float) microtime() * 1000000);
- $salt = pack('CCCC', mt_rand(), mt_rand(), mt_rand(), mt_rand());
-
- return '{SSHA}'.base64_encode(pack('H*', sha1($password.$salt)).$salt);
- }
-
- /**
- * Round a Windows timestamp down to seconds and remove
- * the seconds between 1601-01-01 and 1970-01-01.
- *
- * @param float $windowsTime
- *
- * @return float
- */
- public static function convertWindowsTimeToUnixTime($windowsTime)
- {
- return round($windowsTime / 10000000) - 11644473600;
- }
-
- /**
- * Convert a Unix timestamp to Windows timestamp.
- *
- * @param float $unixTime
- *
- * @return float
- */
- public static function convertUnixTimeToWindowsTime($unixTime)
- {
- return ($unixTime + 11644473600) * 10000000;
- }
-
- /**
- * Validates that the inserted string is an object SID.
- *
- * @param string $sid
- *
- * @return bool
- */
- public static function isValidSid($sid)
- {
- return (bool) preg_match("/^S-\d(-\d{1,10}){1,16}$/i", $sid);
- }
-
- /**
- * Validates that the inserted string is an object GUID.
- *
- * @param string $guid
- *
- * @return bool
- */
- public static function isValidGuid($guid)
- {
- return (bool) preg_match('/^([0-9a-fA-F]){8}(-([0-9a-fA-F]){4}){3}-([0-9a-fA-F]){12}$|^([0-9a-fA-F]{8}-){3}[0-9a-fA-F]{8}$/', $guid);
- }
-
- /**
- * Converts an ignore string into an array.
- *
- * @param string $ignore
- *
- * @return array
- */
- protected static function ignoreStrToArray($ignore)
- {
- $ignore = trim($ignore);
-
- return $ignore ? str_split($ignore) : [];
- }
-}
diff --git a/data/web/inc/lib/vendor/composer/autoload_psr4.php b/data/web/inc/lib/vendor/composer/autoload_psr4.php
index 6a01462ca..5d0af0ddd 100644
--- a/data/web/inc/lib/vendor/composer/autoload_psr4.php
+++ b/data/web/inc/lib/vendor/composer/autoload_psr4.php
@@ -40,7 +40,6 @@ return array(
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
- 'Ddeboer\\Imap\\' => array($vendorDir . '/ddeboer/imap/src'),
'DASPRiD\\Enum\\' => array($vendorDir . '/dasprid/enum/src'),
'Carbon\\Doctrine\\' => array($vendorDir . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine'),
'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
diff --git a/data/web/inc/lib/vendor/composer/autoload_static.php b/data/web/inc/lib/vendor/composer/autoload_static.php
index 19990d8c2..ad5d1741c 100644
--- a/data/web/inc/lib/vendor/composer/autoload_static.php
+++ b/data/web/inc/lib/vendor/composer/autoload_static.php
@@ -93,7 +93,6 @@ class ComposerStaticInit873464e4bd965a3168f133248b1b218b
),
'D' =>
array (
- 'Ddeboer\\Imap\\' => 13,
'DASPRiD\\Enum\\' => 13,
),
'C' =>
@@ -247,10 +246,6 @@ class ComposerStaticInit873464e4bd965a3168f133248b1b218b
array (
0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
),
- 'Ddeboer\\Imap\\' =>
- array (
- 0 => __DIR__ . '/..' . '/ddeboer/imap/src',
- ),
'DASPRiD\\Enum\\' =>
array (
0 => __DIR__ . '/..' . '/dasprid/enum/src',
diff --git a/data/web/inc/lib/vendor/composer/installed.json b/data/web/inc/lib/vendor/composer/installed.json
index 53c26aab1..f49097ac9 100644
--- a/data/web/inc/lib/vendor/composer/installed.json
+++ b/data/web/inc/lib/vendor/composer/installed.json
@@ -252,85 +252,6 @@
},
"install-path": "../dasprid/enum"
},
- {
- "name": "ddeboer/imap",
- "version": "1.19.0",
- "version_normalized": "1.19.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ddeboer/imap.git",
- "reference": "30800b1cfeacc4add5bb418e40a8b6e95a8a04ac"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ddeboer/imap/zipball/30800b1cfeacc4add5bb418e40a8b6e95a8a04ac",
- "reference": "30800b1cfeacc4add5bb418e40a8b6e95a8a04ac",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-iconv": "*",
- "ext-imap": "*",
- "ext-libxml": "*",
- "ext-mbstring": "*",
- "php": "~8.2.0 || ~8.3.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^3.38.2",
- "laminas/laminas-mail": "^2.25.1",
- "phpstan/phpstan": "^1.10.43",
- "phpstan/phpstan-phpunit": "^1.3.15",
- "phpstan/phpstan-strict-rules": "^1.5.2",
- "phpunit/phpunit": "^10.4.2"
- },
- "time": "2023-11-20T14:41:54+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Ddeboer\\Imap\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "David de Boer",
- "email": "david@ddeboer.nl"
- },
- {
- "name": "Filippo Tessarotto",
- "email": "zoeslam@gmail.com"
- },
- {
- "name": "Community contributors",
- "homepage": "https://github.com/ddeboer/imap/graphs/contributors"
- }
- ],
- "description": "Object-oriented IMAP for PHP",
- "keywords": [
- "email",
- "imap",
- "mail"
- ],
- "support": {
- "issues": "https://github.com/ddeboer/imap/issues",
- "source": "https://github.com/ddeboer/imap/tree/1.19.0"
- },
- "funding": [
- {
- "url": "https://github.com/Slamdunk",
- "type": "github"
- },
- {
- "url": "https://github.com/ddeboer",
- "type": "github"
- }
- ],
- "install-path": "../ddeboer/imap"
- },
{
"name": "directorytree/ldaprecord",
"version": "v3.8.6",
diff --git a/data/web/inc/lib/vendor/composer/installed.php b/data/web/inc/lib/vendor/composer/installed.php
index 25474f826..503ab5963 100644
--- a/data/web/inc/lib/vendor/composer/installed.php
+++ b/data/web/inc/lib/vendor/composer/installed.php
@@ -55,15 +55,6 @@
'aliases' => array(),
'dev_requirement' => false,
),
- 'ddeboer/imap' => array(
- 'pretty_version' => '1.19.0',
- 'version' => '1.19.0.0',
- 'reference' => '30800b1cfeacc4add5bb418e40a8b6e95a8a04ac',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../ddeboer/imap',
- 'aliases' => array(),
- 'dev_requirement' => false,
- ),
'directorytree/ldaprecord' => array(
'pretty_version' => 'v3.8.6',
'version' => '3.8.6.0',
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php b/data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php
deleted file mode 100644
index 11bbc9bd9..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/.php-cs-fixer.php
+++ /dev/null
@@ -1,73 +0,0 @@
-setRiskyAllowed(true)
- ->setRules([
- '@DoctrineAnnotation' => true,
- '@Symfony' => true,
- '@Symfony:risky' => true,
- '@PHPUnit75Migration:risky' => true,
- '@PHP71Migration' => true,
- '@PHP70Migration:risky' => true, // @TODO with next major version
- 'align_multiline_comment' => ['comment_type' => 'all_multiline'],
- 'array_indentation' => true,
- 'array_syntax' => ['syntax' => 'short'],
- 'binary_operator_spaces' => ['default' => 'align_single_space'],
- 'blank_line_before_statement' => true,
- 'class_definition' => ['single_item_single_line' => true],
- 'compact_nullable_type_declaration' => true,
- 'concat_space' => ['spacing' => 'one'],
- 'echo_tag_syntax' => ['format' => 'long'],
- 'error_suppression' => false,
- 'escape_implicit_backslashes' => true,
- 'explicit_indirect_variable' => true,
- 'explicit_string_variable' => true,
- 'fully_qualified_strict_types' => true,
- 'heredoc_to_nowdoc' => true,
- 'list_syntax' => ['syntax' => 'long'],
- 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
- 'method_chaining_indentation' => true,
- 'multiline_comment_opening_closing' => true,
- 'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
- 'native_constant_invocation' => true,
- 'native_function_invocation' => ['include' => ['@internal']],
- 'no_alternative_syntax' => true,
- 'no_break_comment' => true,
- 'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
- 'no_null_property_initialization' => true,
- 'no_php4_constructor' => true,
- 'no_superfluous_elseif' => true,
- 'no_unneeded_braces' => true,
- 'no_unneeded_final_method' => true,
- 'no_unreachable_default_argument_value' => true,
- 'no_useless_else' => true,
- 'no_useless_return' => true,
- 'ordered_imports' => true,
- 'php_unit_method_casing' => true,
- 'php_unit_set_up_tear_down_visibility' => true,
- 'php_unit_strict' => true,
- 'php_unit_test_annotation' => true,
- 'php_unit_test_case_static_method_calls' => false,
- 'php_unit_test_class_requires_covers' => false,
- 'phpdoc_add_missing_param_annotation' => true,
- 'phpdoc_order' => true,
- 'phpdoc_order_by_value' => true,
- 'phpdoc_types_order' => true,
- 'random_api_migration' => true,
- 'semicolon_after_instruction' => true,
- 'simplified_null_return' => true,
- 'single_line_comment_style' => true,
- 'single_line_throw' => false,
- 'space_after_semicolon' => true,
- 'static_lambda' => true,
- 'strict_comparison' => true,
- 'string_line_ending' => true,
- ])
- ->setFinder(
- PhpCsFixer\Finder::create()
- ->in(__DIR__ . '/src')
- ->in(__DIR__ . '/tests')
- )
-;
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/LICENSE b/data/web/inc/lib/vendor/ddeboer/imap/LICENSE
deleted file mode 100644
index 2c679e302..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2013 David de Boer
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/README.md b/data/web/inc/lib/vendor/ddeboer/imap/README.md
deleted file mode 100644
index 8fea97824..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/README.md
+++ /dev/null
@@ -1,305 +0,0 @@
-# PHP IMAP library
-
-[](https://packagist.org/packages/ddeboer/imap)
-[](https://packagist.org/packages/ddeboer/imap)
-[](https://github.com/ddeboer/imap/actions)
-[](https://codecov.io/gh/ddeboer/imap?branch=master)
-
-A PHP IMAP library to read and process e-mails over IMAP protocol, built with robust Object-Oriented architecture.
-
-This library requires PHP >= 8.2 with [IMAP](https://www.php.net/manual/en/book.imap.php),
-[iconv](https://www.php.net/manual/en/book.iconv.php) and
-[Multibyte String](https://www.php.net/manual/en/book.mbstring.php) extensions installed.
-
-## Installation
-
-The recommended way to install the IMAP library is through [Composer](https://getcomposer.org):
-
-```bash
-$ composer require ddeboer/imap
-```
-
-This command requires you to have Composer installed globally, as explained
-in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
-of the Composer documentation.
-
-## Usage
-
-### Connect and Authenticate
-
-```php
-use Ddeboer\Imap\Server;
-
-$server = new Server('imap.gmail.com');
-
-// $connection is instance of \Ddeboer\Imap\Connection
-$connection = $server->authenticate('my_username', 'my_password');
-```
-
-You can specify port, [flags and parameters](https://secure.php.net/manual/en/function.imap-open.php)
-to the server:
-
-```php
-$server = new Server(
- $hostname, // required
- $port, // defaults to '993'
- $flags, // defaults to '/imap/ssl/validate-cert'
- $parameters
-);
-```
-
-### Mailboxes
-
-Retrieve mailboxes (also known as mail folders) from the mail server and iterate
-over them:
-
-```php
-$mailboxes = $connection->getMailboxes();
-
-foreach ($mailboxes as $mailbox) {
- // Skip container-only mailboxes
- // @see https://secure.php.net/manual/en/function.imap-getmailboxes.php
- if ($mailbox->getAttributes() & \LATT_NOSELECT) {
- continue;
- }
-
- // $mailbox is instance of \Ddeboer\Imap\Mailbox
- printf('Mailbox "%s" has %s messages', $mailbox->getName(), $mailbox->count());
-}
-```
-
-Or retrieve a specific mailbox:
-
-```php
-$mailbox = $connection->getMailbox('INBOX');
-```
-
-Delete a mailbox:
-
-```php
-$connection->deleteMailbox($mailbox);
-```
-
-You can bulk set, or clear, any [flag](https://secure.php.net/manual/en/function.imap-setflag-full.php) of mailbox messages (by UIDs):
-
-```php
-$mailbox->setFlag('\\Seen \\Flagged', ['1:5', '7', '9']);
-$mailbox->setFlag('\\Seen', '1,3,5,6:8');
-
-$mailbox->clearFlag('\\Flagged', '1,3');
-```
-
-**WARNING** You must retrieve new Message instances in case of bulk modify flags to refresh the single Messages flags.
-
-### Messages
-
-Retrieve messages (e-mails) from a mailbox and iterate over them:
-
-```php
-$messages = $mailbox->getMessages();
-
-foreach ($messages as $message) {
- // $message is instance of \Ddeboer\Imap\Message
-}
-```
-
-To insert a new message (that just has been sent) into the Sent mailbox and flag it as seen:
-
-```php
-$mailbox = $connection->getMailbox('Sent');
-$mailbox->addMessage($messageMIME, '\\Seen');
-```
-
-Note that the message should be a string at MIME format (as described in the [RFC2045](https://tools.ietf.org/html/rfc2045)).
-
-#### Searching for Messages
-
-```php
-use Ddeboer\Imap\SearchExpression;
-use Ddeboer\Imap\Search\Email\To;
-use Ddeboer\Imap\Search\Text\Body;
-
-$search = new SearchExpression();
-$search->addCondition(new To('me@here.com'));
-$search->addCondition(new Body('contents'));
-
-$messages = $mailbox->getMessages($search);
-```
-
-**WARNING** We are currently unable to have both spaces _and_ double-quotes
-escaped together. Only spaces are currently escaped correctly.
-You can use `Ddeboer\Imap\Search\RawExpression` to write the complete search
-condition by yourself.
-
-Messages can also be retrieved sorted as per [imap_sort](https://secure.php.net/manual/en/function.imap-sort.php)
-function:
-
-```php
-$today = new DateTimeImmutable();
-$thirtyDaysAgo = $today->sub(new DateInterval('P30D'));
-
-$messages = $mailbox->getMessages(
- new Ddeboer\Imap\Search\Date\Since($thirtyDaysAgo),
- \SORTDATE, // Sort criteria
- true // Descending order
-);
-```
-
-#### Unknown search criterion: OR
-
-Note that PHP imap library relies on the `c-client` library available at https://www.washington.edu/imap/
-which doesn't fully support some IMAP4 search criteria like `OR`. If you want those unsupported criteria,
-you need to manually patch the latest version (`imap-2007f` of 23-Jul-2011 at the time of this commit)
-and recompile PHP onto your patched `c-client` library.
-
-By the way most of the common search criteria are available and functioning, browse them in `./src/Search`.
-
-References:
-
-1. https://stackoverflow.com/questions/36356715/imap-search-unknown-search-criterion-or
-2. imap-2007f.tar.gz: `./src/c-client/mail.c` and `./docs/internal.txt`
-
-#### Message Properties and Operations
-
-Get message number and unique [message id](https://en.wikipedia.org/wiki/Message-ID)
-in the form <...>:
-
-```php
-$message->getNumber();
-$message->getId();
-```
-
-Get other message properties:
-
-```php
-$message->getSubject();
-$message->getFrom(); // Message\EmailAddress
-$message->getTo(); // array of Message\EmailAddress
-$message->getDate(); // DateTimeImmutable
-$message->isAnswered();
-$message->isDeleted();
-$message->isDraft();
-$message->isSeen();
-```
-
-Get message headers as a [\Ddeboer\Imap\Message\Headers](/src/Message/Headers.php) object:
-
-```php
-$message->getHeaders();
-```
-
-Get message body as HTML or plain text (only first part):
-
-```php
-$message->getBodyHtml(); // Content of text/html part, if present
-$message->getBodyText(); // Content of text/plain part, if present
-```
-
-
-Get complete body (all parts):
-
-```php
-$body = $message->getCompleteBodyHtml(); // Content of text/html part, if present
-if ($body === null) { // If body is null, there are no HTML parts, so let's try getting the text body
- $body = $message->getCompleteBodyText(); // Content of text/plain part, if present
-}
-```
-
-Reading the message body keeps the message as unseen.
-If you want to mark the message as seen:
-
-```php
-$message->markAsSeen();
-```
-
-Or you can set, or clear, any [flag](https://secure.php.net/manual/en/function.imap-setflag-full.php):
-
-```php
-$message->setFlag('\\Seen \\Flagged');
-$message->clearFlag('\\Flagged');
-```
-
-Move a message to another mailbox:
-
-```php
-$mailbox = $connection->getMailbox('another-mailbox');
-$message->move($mailbox);
-```
-
-Deleting messages:
-
-```php
-$mailbox->getMessage(1)->delete();
-$mailbox->getMessage(2)->delete();
-$connection->expunge();
-```
-
-### Message Attachments
-
-Get message attachments (both inline and attached) and iterate over them:
-
-```php
-$attachments = $message->getAttachments();
-
-foreach ($attachments as $attachment) {
- // $attachment is instance of \Ddeboer\Imap\Message\Attachment
-}
-```
-
-Download a message attachment to a local file:
-
-```php
-// getDecodedContent() decodes the attachment’s contents automatically:
-file_put_contents(
- '/my/local/dir/' . $attachment->getFilename(),
- $attachment->getDecodedContent()
-);
-```
-
-### Embedded Messages
-
-Check if attachment is embedded message and get it:
-
-```php
-$attachments = $message->getAttachments();
-
-foreach ($attachments as $attachment) {
- if ($attachment->isEmbeddedMessage()) {
- $embeddedMessage = $attachment->getEmbeddedMessage();
- // $embeddedMessage is instance of \Ddeboer\Imap\Message\EmbeddedMessage
- }
-}
-```
-
-An EmbeddedMessage has the same API as a normal Message, apart from flags
-and operations like copy, move or delete.
-
-### Timeouts
-
-The IMAP extension provides the [imap_timeout](https://secure.php.net/manual/en/function.imap-timeout.php)
-function to adjust the timeout seconds for various operations.
-
-However the extension's implementation doesn't link the functionality to a
-specific context or connection, instead they are global. So in order to not
-affect functionalities outside this library, we had to choose whether wrap
-every `imap_*` call around an optional user-provided timeout or leave this
-task to the user.
-
-Because of the heterogeneous world of IMAP servers and the high complexity
-burden cost for such a little gain of the former, we chose the latter.
-
-## Mock the library
-
-Mockability is granted by interfaces present for each API.
-Dig into [MockabilityTest](tests/MockabilityTest.php) for an example of a
-mocked workflow.
-
-## Contributing: run the build locally
-
-Docker is needed to run the build on your computer.
-
-First command you need to run is `make start-imap-server`, which starts an IMAP server locally.
-
-Then the local build can be triggered with a bare `make`.
-
-When you finish the development, stop the local IMAP server with `make stop-imap-server`.
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/composer.json b/data/web/inc/lib/vendor/ddeboer/imap/composer.json
deleted file mode 100644
index 357c01972..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/composer.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "name": "ddeboer/imap",
- "description": "Object-oriented IMAP for PHP",
- "license": "MIT",
- "keywords": [
- "email",
- "mail",
- "imap"
- ],
- "authors": [
- {
- "name": "David de Boer",
- "email": "david@ddeboer.nl"
- },
- {
- "name": "Filippo Tessarotto",
- "email": "zoeslam@gmail.com"
- },
- {
- "name": "Community contributors",
- "homepage": "https://github.com/ddeboer/imap/graphs/contributors"
- }
- ],
- "require": {
- "php": "~8.2.0 || ~8.3.0",
- "ext-dom": "*",
- "ext-iconv": "*",
- "ext-imap": "*",
- "ext-libxml": "*",
- "ext-mbstring": "*"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^3.38.2",
- "laminas/laminas-mail": "^2.25.1",
- "phpstan/phpstan": "^1.10.43",
- "phpstan/phpstan-phpunit": "^1.3.15",
- "phpstan/phpstan-strict-rules": "^1.5.2",
- "phpunit/phpunit": "^10.4.2"
- },
- "autoload": {
- "psr-4": {
- "Ddeboer\\Imap\\": "src/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "Ddeboer\\Imap\\Tests\\": "tests/"
- }
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Connection.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Connection.php
deleted file mode 100644
index 538080e90..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Connection.php
+++ /dev/null
@@ -1,180 +0,0 @@
-
- */
- private ?array $mailboxNames = null;
-
- /**
- * Constructor.
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(ImapResourceInterface $resource, string $server)
- {
- $this->resource = $resource;
- $this->server = $server;
- }
-
- public function getResource(): ImapResourceInterface
- {
- return $this->resource;
- }
-
- public function expunge(): bool
- {
- return \imap_expunge($this->resource->getStream());
- }
-
- public function close(int $flag = 0): bool
- {
- $stream = $this->resource->getStream();
-
- $this->resource->clearLastMailboxUsedCache();
-
- return \imap_close($stream, $flag);
- }
-
- public function getQuota(string $root = 'INBOX'): array
- {
- $errorMessage = null;
- $errorNumber = 0;
- \set_error_handler(static function ($nr, $message) use (&$errorMessage, &$errorNumber): bool {
- $errorMessage = $message;
- $errorNumber = $nr;
-
- return true;
- });
-
- $return = \imap_get_quotaroot($this->resource->getStream(), $root);
-
- \restore_error_handler();
-
- if (false === $return || null !== $errorMessage) {
- throw new ImapQuotaException(
- \sprintf(
- 'IMAP Quota request failed for "%s"%s',
- $root,
- null !== $errorMessage ? ': ' . $errorMessage : ''
- ),
- $errorNumber
- );
- }
-
- return $return;
- }
-
- public function getMailboxes(): array
- {
- $this->initMailboxNames();
- \assert(null !== $this->mailboxNames);
-
- if (null === $this->mailboxes) {
- $this->mailboxes = [];
- foreach ($this->mailboxNames as $mailboxName => $mailboxInfo) {
- $this->mailboxes[(string) $mailboxName] = $this->getMailbox((string) $mailboxName);
- }
- }
-
- return $this->mailboxes;
- }
-
- public function hasMailbox(string $name): bool
- {
- $this->initMailboxNames();
- \assert(null !== $this->mailboxNames);
-
- return isset($this->mailboxNames[$name]);
- }
-
- public function getMailbox(string $name): MailboxInterface
- {
- if (false === $this->hasMailbox($name)) {
- throw new MailboxDoesNotExistException(\sprintf('Mailbox name "%s" does not exist', $name));
- }
- \assert(isset($this->mailboxNames[$name]));
-
- return new Mailbox($this->resource, $name, $this->mailboxNames[$name]);
- }
-
- #[\ReturnTypeWillChange]
- public function count()
- {
- $return = \imap_num_msg($this->resource->getStream());
-
- if (false === $return) {
- throw new ImapNumMsgException('imap_num_msg failed');
- }
-
- return $return;
- }
-
- public function ping(): bool
- {
- return \imap_ping($this->resource->getStream());
- }
-
- public function createMailbox(string $name): MailboxInterface
- {
- if (false === \imap_createmailbox($this->resource->getStream(), $this->server . \mb_convert_encoding($name, 'UTF7-IMAP', 'UTF-8'))) {
- throw new CreateMailboxException(\sprintf('Can not create "%s" mailbox at "%s"', $name, $this->server));
- }
-
- $this->mailboxNames = $this->mailboxes = null;
- $this->resource->clearLastMailboxUsedCache();
-
- return $this->getMailbox($name);
- }
-
- public function deleteMailbox(MailboxInterface $mailbox): void
- {
- if (false === \imap_deletemailbox($this->resource->getStream(), $mailbox->getFullEncodedName())) {
- throw new DeleteMailboxException(\sprintf('Mailbox "%s" could not be deleted', $mailbox->getName()));
- }
-
- $this->mailboxes = $this->mailboxNames = null;
- $this->resource->clearLastMailboxUsedCache();
- }
-
- private function initMailboxNames(): void
- {
- if (null !== $this->mailboxNames) {
- return;
- }
-
- $this->mailboxNames = [];
- $mailboxesInfo = \imap_getmailboxes($this->resource->getStream(), $this->server, '*');
- if (!\is_array($mailboxesInfo)) {
- throw new ImapGetmailboxesException('imap_getmailboxes failed');
- }
-
- foreach ($mailboxesInfo as $mailboxInfo) {
- $name = \mb_convert_encoding(\str_replace($this->server, '', $mailboxInfo->name), 'UTF-8', 'UTF7-IMAP');
- \assert(\is_string($name));
-
- $this->mailboxNames[$name] = $mailboxInfo;
- }
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/ConnectionInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/ConnectionInterface.php
deleted file mode 100644
index 5d27854cb..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/ConnectionInterface.php
+++ /dev/null
@@ -1,79 +0,0 @@
-
- */
- public function getQuota(string $root = 'INBOX'): array;
-
- /**
- * Get a list of mailboxes (also known as folders).
- *
- * @return MailboxInterface[]
- */
- public function getMailboxes(): array;
-
- /**
- * Check that a mailbox with the given name exists.
- *
- * @param string $name Mailbox name
- */
- public function hasMailbox(string $name): bool;
-
- /**
- * Get a mailbox by its name.
- *
- * @param string $name Mailbox name
- *
- * @throws MailboxDoesNotExistException If mailbox does not exist
- */
- public function getMailbox(string $name): MailboxInterface;
-
- /**
- * Create mailbox.
- *
- * @throws CreateMailboxException
- */
- public function createMailbox(string $name): MailboxInterface;
-
- /**
- * Delete mailbox.
- *
- * @throws DeleteMailboxException
- */
- public function deleteMailbox(MailboxInterface $mailbox): void;
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Exception/AbstractException.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Exception/AbstractException.php
deleted file mode 100644
index 6537a0574..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Exception/AbstractException.php
+++ /dev/null
@@ -1,49 +0,0 @@
- 'E_ERROR',
- \E_WARNING => 'E_WARNING',
- \E_PARSE => 'E_PARSE',
- \E_NOTICE => 'E_NOTICE',
- \E_CORE_ERROR => 'E_CORE_ERROR',
- \E_CORE_WARNING => 'E_CORE_WARNING',
- \E_COMPILE_ERROR => 'E_COMPILE_ERROR',
- \E_COMPILE_WARNING => 'E_COMPILE_WARNING',
- \E_USER_ERROR => 'E_USER_ERROR',
- \E_USER_WARNING => 'E_USER_WARNING',
- \E_USER_NOTICE => 'E_USER_NOTICE',
- \E_STRICT => 'E_STRICT',
- \E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR',
- \E_DEPRECATED => 'E_DEPRECATED',
- \E_USER_DEPRECATED => 'E_USER_DEPRECATED',
- ];
-
- final public function __construct(string $message, int $code = 0, \Throwable $previous = null)
- {
- $errorType = '';
- if (isset(self::ERROR_LABELS[$code])) {
- $errorType = \sprintf('[%s] ', self::ERROR_LABELS[$code]);
- }
-
- $joinString = "\n- ";
- $alerts = \imap_alerts();
- $errors = \imap_errors();
- $completeMessage = \sprintf(
- "%s%s\nimap_alerts (%s):%s\nimap_errors (%s):%s",
- $errorType,
- $message,
- false !== $alerts ? \count($alerts) : 0,
- false !== $alerts ? $joinString . \implode($joinString, $alerts) : '',
- false !== $errors ? \count($errors) : 0,
- false !== $errors ? $joinString . \implode($joinString, $errors) : ''
- );
-
- parent::__construct($completeMessage, $code, $previous);
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Exception/AuthenticationFailedException.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Exception/AuthenticationFailedException.php
deleted file mode 100644
index c0e93d002..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Exception/AuthenticationFailedException.php
+++ /dev/null
@@ -1,9 +0,0 @@
-resource = $resource;
- $this->mailbox = $mailbox;
- }
-
- public function getStream(): Connection
- {
- $this->initMailbox();
-
- return $this->resource;
- }
-
- public function clearLastMailboxUsedCache(): void
- {
- self::$lastMailboxUsedCache = null;
- }
-
- /**
- * If connection is not currently in this mailbox, switch it to this mailbox.
- */
- private function initMailbox(): void
- {
- if (null === $this->mailbox || self::isMailboxOpen($this->mailbox, $this->resource)) {
- return;
- }
-
- \set_error_handler(static function (): bool {
- return true;
- });
-
- \imap_reopen($this->resource, $this->mailbox->getFullEncodedName());
-
- \restore_error_handler();
-
- if (self::isMailboxOpen($this->mailbox, $this->resource)) {
- return;
- }
-
- throw new ReopenMailboxException(\sprintf('Cannot reopen mailbox "%s"', $this->mailbox->getName()));
- }
-
- /**
- * Check whether the current mailbox is open.
- */
- private static function isMailboxOpen(MailboxInterface $mailbox, Connection $resource): bool
- {
- $currentMailboxName = $mailbox->getFullEncodedName();
- if ($currentMailboxName === self::$lastMailboxUsedCache) {
- return true;
- }
-
- self::$lastMailboxUsedCache = null;
- $check = \imap_check($resource);
- $return = false !== $check && $check->Mailbox === $currentMailboxName;
-
- if (true === $return) {
- self::$lastMailboxUsedCache = $currentMailboxName;
- }
-
- return $return;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/ImapResourceInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/ImapResourceInterface.php
deleted file mode 100644
index ff3c15cde..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/ImapResourceInterface.php
+++ /dev/null
@@ -1,20 +0,0 @@
-resource = new ImapResource($resource->getStream(), $this);
- $this->name = $name;
- $this->info = $info;
- }
-
- public function getName(): string
- {
- return $this->name;
- }
-
- public function renameTo(string $name): bool
- {
- $encodedName = \mb_convert_encoding($name, 'UTF7-IMAP', 'UTF-8');
- $oldFullName = $this->getFullEncodedName();
- $newFullName = \preg_replace('/' . \preg_quote(\mb_convert_encoding($this->name, 'UTF7-IMAP', 'UTF-8')) . '$/', $encodedName, $oldFullName);
- \assert(null !== $newFullName);
-
- $return = \imap_renamemailbox($this->resource->getStream(), $oldFullName, $newFullName);
- if (false === $return) {
- throw new RenameMailboxException('Could not rename mailbox');
- }
- $this->name = $name;
- $this->info->name = $newFullName;
-
- return true;
- }
-
- public function getEncodedName(): string
- {
- /** @var string $name */
- $name = $this->info->name;
-
- return (string) \preg_replace('/^{.+}/', '', $name);
- }
-
- public function getFullEncodedName(): string
- {
- return $this->info->name;
- }
-
- public function getAttributes(): int
- {
- return $this->info->attributes;
- }
-
- public function getDelimiter(): string
- {
- return $this->info->delimiter;
- }
-
- #[\ReturnTypeWillChange]
- public function count()
- {
- $return = \imap_num_msg($this->resource->getStream());
-
- if (false === $return) {
- throw new ImapNumMsgException('imap_num_msg failed');
- }
-
- return $return;
- }
-
- public function getStatus(int $flags = null): \stdClass
- {
- $return = \imap_status($this->resource->getStream(), $this->getFullEncodedName(), $flags ?? \SA_ALL);
-
- if (false === $return) {
- throw new ImapStatusException('imap_status failed');
- }
-
- return $return;
- }
-
- public function setFlag(string $flag, $numbers): bool
- {
- return \imap_setflag_full($this->resource->getStream(), $this->prepareMessageIds($numbers), $flag, \ST_UID);
- }
-
- public function clearFlag(string $flag, $numbers): bool
- {
- return \imap_clearflag_full($this->resource->getStream(), $this->prepareMessageIds($numbers), $flag, \ST_UID);
- }
-
- public function getMessages(ConditionInterface $search = null, int $sortCriteria = null, bool $descending = false, string $charset = null): MessageIteratorInterface
- {
- if (null === $search) {
- $search = new All();
- }
- $query = $search->toString();
-
- // We need to clear the stack to know whether imap_last_error()
- // is related to this imap_search
- \imap_errors();
-
- if (null !== $sortCriteria) {
- $params = [
- $this->resource->getStream(),
- $sortCriteria,
- $descending,
- \SE_UID,
- $query,
- ];
- if (null !== $charset) {
- $params[] = $charset;
- }
- $messageNumbers = \imap_sort(...$params);
- } else {
- $params = [
- $this->resource->getStream(),
- $query,
- \SE_UID,
- ];
- if (null !== $charset) {
- $params[] = $charset;
- }
- $messageNumbers = \imap_search(...$params);
- }
- if (false !== \imap_last_error()) {
- // this way all errors occurred during search will be reported
- throw new InvalidSearchCriteriaException(
- \sprintf('Invalid search criteria [%s]', $query)
- );
- }
- if (false === $messageNumbers) {
- // imap_search can also return false
- $messageNumbers = [];
- }
-
- return new MessageIterator($this->resource, $messageNumbers);
- }
-
- public function getMessageSequence(string $sequence): MessageIteratorInterface
- {
- \imap_errors();
-
- $overview = \imap_fetch_overview($this->resource->getStream(), $sequence, \FT_UID);
- if (false !== \imap_last_error()) {
- throw new InvalidSearchCriteriaException(
- \sprintf('Invalid sequence [%s]', $sequence)
- );
- }
- if (\is_array($overview) && [] !== $overview) {
- $messageNumbers = \array_column($overview, 'uid');
- } else {
- $messageNumbers = [];
- }
-
- return new MessageIterator($this->resource, $messageNumbers);
- }
-
- public function getMessage(int $number): MessageInterface
- {
- return new Message($this->resource, $number);
- }
-
- public function getIterator(): MessageIteratorInterface
- {
- return $this->getMessages();
- }
-
- public function addMessage(string $message, string $options = null, \DateTimeInterface $internalDate = null): bool
- {
- $arguments = [
- $this->resource->getStream(),
- $this->getFullEncodedName(),
- $message,
- $options ?? '',
- ];
- if (null !== $internalDate) {
- $arguments[] = $internalDate->format('d-M-Y H:i:s O');
- }
-
- return \imap_append(...$arguments);
- }
-
- public function getThread(): array
- {
- \set_error_handler(static function (): bool {
- return true;
- });
-
- /** @var array|false $tree */
- $tree = \imap_thread($this->resource->getStream(), \SE_UID);
-
- \restore_error_handler();
-
- return false !== $tree ? $tree : [];
- }
-
- public function move($numbers, MailboxInterface $mailbox): void
- {
- if (!\imap_mail_copy($this->resource->getStream(), $this->prepareMessageIds($numbers), $mailbox->getEncodedName(), \CP_UID | \CP_MOVE)) {
- throw new MessageMoveException(\sprintf('Messages cannot be moved to "%s"', $mailbox->getName()));
- }
- }
-
- public function copy($numbers, MailboxInterface $mailbox): void
- {
- if (!\imap_mail_copy($this->resource->getStream(), $this->prepareMessageIds($numbers), $mailbox->getEncodedName(), \CP_UID)) {
- throw new MessageCopyException(\sprintf('Messages cannot be copied to "%s"', $mailbox->getName()));
- }
- }
-
- /**
- * Prepare message ids for the use with bulk functions.
- *
- * @param array|MessageIterator|string $messageIds Message numbers
- */
- private function prepareMessageIds($messageIds): string
- {
- if ($messageIds instanceof MessageIterator) {
- $messageIds = $messageIds->getArrayCopy();
- }
-
- if (\is_array($messageIds)) {
- $messageIds = \implode(',', $messageIds);
- }
-
- return $messageIds;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/MailboxInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/MailboxInterface.php
deleted file mode 100644
index f32480495..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/MailboxInterface.php
+++ /dev/null
@@ -1,127 +0,0 @@
-
- */
-interface MailboxInterface extends \Countable, \IteratorAggregate
-{
- /**
- * Get mailbox decoded name.
- */
- public function getName(): string;
-
- /**
- * Set new mailbox name.
- */
- public function renameTo(string $name): bool;
-
- /**
- * Get mailbox encoded path.
- */
- public function getEncodedName(): string;
-
- /**
- * Get mailbox encoded full name.
- */
- public function getFullEncodedName(): string;
-
- /**
- * Get mailbox attributes.
- */
- public function getAttributes(): int;
-
- /**
- * Get mailbox delimiter.
- */
- public function getDelimiter(): string;
-
- /**
- * Get Mailbox status.
- */
- public function getStatus(int $flags = null): \stdClass;
-
- /**
- * Bulk Set Flag for Messages.
- *
- * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft
- * @param array|MessageIterator|string $numbers Message numbers
- */
- public function setFlag(string $flag, $numbers): bool;
-
- /**
- * Bulk Clear Flag for Messages.
- *
- * @param string $flag \Seen, \Answered, \Flagged, \Deleted, and \Draft
- * @param array|MessageIterator|string $numbers Message numbers
- */
- public function clearFlag(string $flag, $numbers): bool;
-
- /**
- * Get message ids.
- *
- * @param ConditionInterface $search Search expression (optional)
- */
- public function getMessages(ConditionInterface $search = null, int $sortCriteria = null, bool $descending = false, string $charset = null): MessageIteratorInterface;
-
- /**
- * Get message iterator for a sequence.
- *
- * @param string $sequence Message numbers
- */
- public function getMessageSequence(string $sequence): MessageIteratorInterface;
-
- /**
- * Get a message by message number.
- *
- * @param int $number Message number
- *
- * @return MessageInterface
- */
- public function getMessage(int $number): MessageInterface;
-
- /**
- * Get messages in this mailbox.
- */
- public function getIterator(): MessageIteratorInterface;
-
- /**
- * Add a message to the mailbox.
- */
- public function addMessage(string $message, string $options = null, \DateTimeInterface $internalDate = null): bool;
-
- /**
- * Returns a tree of threaded message for the current Mailbox.
- *
- * @return array
- */
- public function getThread(): array;
-
- /**
- * Bulk move messages.
- *
- * @param array|MessageIterator|string $numbers Message numbers
- * @param MailboxInterface $mailbox Destination Mailbox to move the messages to
- *
- * @throws \Ddeboer\Imap\Exception\MessageMoveException
- */
- public function move($numbers, self $mailbox): void;
-
- /**
- * Bulk copy messages.
- *
- * @param array|MessageIterator|string $numbers Message numbers
- * @param MailboxInterface $mailbox Destination Mailbox to copy the messages to
- *
- * @throws \Ddeboer\Imap\Exception\MessageCopyException
- */
- public function copy($numbers, self $mailbox): void;
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message.php
deleted file mode 100644
index c176e5f87..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message.php
+++ /dev/null
@@ -1,272 +0,0 @@
-structureLoaded) {
- return;
- }
- $this->structureLoaded = true;
-
- $messageNumber = $this->getNumber();
-
- $errorMessage = null;
- $errorNumber = 0;
- \set_error_handler(static function ($nr, $message) use (&$errorMessage, &$errorNumber): bool {
- $errorMessage = $message;
- $errorNumber = $nr;
-
- return true;
- });
-
- $structure = \imap_fetchstructure(
- $this->resource->getStream(),
- $messageNumber,
- \FT_UID
- );
-
- \restore_error_handler();
-
- if (!$structure instanceof \stdClass) {
- throw new MessageStructureException(\sprintf(
- 'Message "%s" structure is empty: %s',
- $messageNumber,
- $errorMessage
- ), $errorNumber);
- }
-
- $this->setStructure($structure);
- }
-
- protected function assertMessageExists(int $messageNumber): void
- {
- if (true === $this->messageNumberVerified) {
- return;
- }
- $this->messageNumberVerified = true;
-
- \set_error_handler(static function (): bool {
- return true;
- });
-
- $msgno = \imap_msgno($this->resource->getStream(), $messageNumber);
-
- \restore_error_handler();
-
- if ($msgno > 0) {
- $this->imapMsgNo = $msgno;
-
- return;
- }
-
- throw new MessageDoesNotExistException(\sprintf(
- 'Message "%s" does not exist',
- $messageNumber
- ));
- }
-
- private function getMsgNo(): int
- {
- // Triggers assertMessageExists()
- $this->getNumber();
-
- return $this->imapMsgNo;
- }
-
- public function getRawHeaders(): string
- {
- if (null === $this->rawHeaders) {
- $rawHeaders = \imap_fetchheader($this->resource->getStream(), $this->getNumber(), \FT_UID);
-
- if (false === $rawHeaders) {
- throw new ImapFetchheaderException('imap_fetchheader failed');
- }
-
- $this->rawHeaders = $rawHeaders;
- }
-
- return $this->rawHeaders;
- }
-
- public function getRawMessage(): string
- {
- if (null === $this->rawMessage) {
- $this->rawMessage = $this->doGetContent('');
- }
-
- return $this->rawMessage;
- }
-
- /**
- * @param resource|string $file the path to the saved file as a string, or a valid file descriptor
- */
- public function saveRawMessage($file): void
- {
- $this->doSaveContent($file, '');
- }
-
- public function getHeaders(): Message\Headers
- {
- if (null === $this->headers) {
- // imap_headerinfo is much faster than imap_fetchheader
- // imap_headerinfo returns only a subset of all mail headers,
- // but it does include the message flags.
- $headers = \imap_headerinfo($this->resource->getStream(), $this->getMsgNo());
- if (false === $headers) {
- // @see https://github.com/ddeboer/imap/issues/358
- throw new InvalidHeadersException(\sprintf('Message "%s" has invalid headers', $this->getNumber()));
- }
- $this->headers = new Message\Headers($headers);
- }
-
- return $this->headers;
- }
-
- /**
- * Clearmessage headers.
- */
- private function clearHeaders(): void
- {
- $this->headers = null;
- }
-
- public function isRecent(): ?string
- {
- $recent = $this->getHeaders()->get('recent');
- \assert(null === $recent || \is_string($recent));
-
- return $recent;
- }
-
- public function isUnseen(): bool
- {
- return 'U' === $this->getHeaders()->get('unseen');
- }
-
- public function isFlagged(): bool
- {
- return 'F' === $this->getHeaders()->get('flagged');
- }
-
- public function isAnswered(): bool
- {
- return 'A' === $this->getHeaders()->get('answered');
- }
-
- public function isDeleted(): bool
- {
- return 'D' === $this->getHeaders()->get('deleted');
- }
-
- public function isDraft(): bool
- {
- return 'X' === $this->getHeaders()->get('draft');
- }
-
- public function isSeen(): bool
- {
- return 'N' !== $this->getHeaders()->get('recent') && 'U' !== $this->getHeaders()->get('unseen');
- }
-
- public function maskAsSeen(): bool
- {
- return $this->markAsSeen();
- }
-
- public function markAsSeen(): bool
- {
- return $this->setFlag('\\Seen');
- }
-
- public function copy(MailboxInterface $mailbox): void
- {
- // 'deleted' header changed, force to reload headers, would be better to set deleted flag to true on header
- $this->clearHeaders();
-
- if (!\imap_mail_copy($this->resource->getStream(), (string) $this->getNumber(), $mailbox->getEncodedName(), \CP_UID)) {
- throw new MessageCopyException(\sprintf('Message "%s" cannot be copied to "%s"', $this->getNumber(), $mailbox->getName()));
- }
- }
-
- public function move(MailboxInterface $mailbox): void
- {
- // 'deleted' header changed, force to reload headers, would be better to set deleted flag to true on header
- $this->clearHeaders();
-
- if (!\imap_mail_move($this->resource->getStream(), (string) $this->getNumber(), $mailbox->getEncodedName(), \CP_UID)) {
- throw new MessageMoveException(\sprintf('Message "%s" cannot be moved to "%s"', $this->getNumber(), $mailbox->getName()));
- }
- }
-
- public function delete(): void
- {
- // 'deleted' header changed, force to reload headers, would be better to set deleted flag to true on header
- $this->clearHeaders();
-
- if (!\imap_delete($this->resource->getStream(), (string) $this->getNumber(), \FT_UID)) {
- throw new MessageDeleteException(\sprintf('Message "%s" cannot be deleted', $this->getNumber()));
- }
- }
-
- public function undelete(): void
- {
- // 'deleted' header changed, force to reload headers, would be better to set deleted flag to false on header
- $this->clearHeaders();
- if (!\imap_undelete($this->resource->getStream(), (string) $this->getNumber(), \FT_UID)) {
- throw new MessageUndeleteException(\sprintf('Message "%s" cannot be undeleted', $this->getNumber()));
- }
- }
-
- public function setFlag(string $flag): bool
- {
- $result = \imap_setflag_full($this->resource->getStream(), (string) $this->getNumber(), $flag, \ST_UID);
-
- $this->clearHeaders();
-
- return $result;
- }
-
- public function clearFlag(string $flag): bool
- {
- $result = \imap_clearflag_full($this->resource->getStream(), (string) $this->getNumber(), $flag, \ST_UID);
-
- $this->clearHeaders();
-
- return $result;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractMessage.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractMessage.php
deleted file mode 100644
index 80ea23839..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractMessage.php
+++ /dev/null
@@ -1,380 +0,0 @@
-
- */
- final public function getId(): ?string
- {
- $messageId = $this->getHeaders()->get('message_id');
- \assert(null === $messageId || \is_string($messageId));
-
- return $messageId;
- }
-
- /**
- * Get message sender (from headers).
- */
- final public function getFrom(): ?EmailAddress
- {
- $from = $this->getHeaders()->get('from');
- \assert(null === $from || \is_array($from));
-
- return null !== $from ? $this->decodeEmailAddress($from[0]) : null;
- }
-
- /**
- * Get To recipients.
- *
- * @return EmailAddress[] Empty array in case message has no To: recipients
- */
- final public function getTo(): array
- {
- $emails = $this->getHeaders()->get('to');
- \assert(null === $emails || \is_array($emails));
-
- return $this->decodeEmailAddresses($emails ?? []);
- }
-
- /**
- * Get Cc recipients.
- *
- * @return EmailAddress[] Empty array in case message has no CC: recipients
- */
- final public function getCc(): array
- {
- $emails = $this->getHeaders()->get('cc');
- \assert(null === $emails || \is_array($emails));
-
- return $this->decodeEmailAddresses($emails ?? []);
- }
-
- /**
- * Get Bcc recipients.
- *
- * @return EmailAddress[] Empty array in case message has no BCC: recipients
- */
- final public function getBcc(): array
- {
- $emails = $this->getHeaders()->get('bcc');
- \assert(null === $emails || \is_array($emails));
-
- return $this->decodeEmailAddresses($emails ?? []);
- }
-
- /**
- * Get Reply-To recipients.
- *
- * @return EmailAddress[] Empty array in case message has no Reply-To: recipients
- */
- final public function getReplyTo(): array
- {
- $emails = $this->getHeaders()->get('reply_to');
- \assert(null === $emails || \is_array($emails));
-
- return $this->decodeEmailAddresses($emails ?? []);
- }
-
- /**
- * Get Sender.
- *
- * @return EmailAddress[] Empty array in case message has no Sender: recipients
- */
- final public function getSender(): array
- {
- $emails = $this->getHeaders()->get('sender');
- \assert(null === $emails || \is_array($emails));
-
- return $this->decodeEmailAddresses($emails ?? []);
- }
-
- /**
- * Get Return-Path.
- *
- * @return EmailAddress[] Empty array in case message has no Return-Path: recipients
- */
- final public function getReturnPath(): array
- {
- $emails = $this->getHeaders()->get('return_path');
- \assert(null === $emails || \is_array($emails));
-
- return $this->decodeEmailAddresses($emails ?? []);
- }
-
- /**
- * Get date (from headers).
- */
- final public function getDate(): ?\DateTimeImmutable
- {
- /** @var null|string $dateHeader */
- $dateHeader = $this->getHeaders()->get('date');
- if (null === $dateHeader) {
- return null;
- }
-
- $alteredValue = $dateHeader;
- $alteredValue = \str_replace(',', '', $alteredValue);
- $alteredValue = (string) \preg_replace('/^[a-zA-Z]+ ?/', '', $alteredValue);
- $alteredValue = (string) \preg_replace('/\(.*\)/', '', $alteredValue);
- $alteredValue = (string) \preg_replace('/\<.*\>/', '', $alteredValue);
- $alteredValue = (string) \preg_replace('/\bUT\b/', 'UTC', $alteredValue);
- if (0 === \preg_match('/\d\d:\d\d:\d\d.* [\+\-]\d\d:?\d\d/', $alteredValue)) {
- $alteredValue .= ' +0000';
- }
- // Handle numeric months
- $alteredValue = (string) \preg_replace('/^(\d\d) (\d\d) (\d\d(?:\d\d)?) /', '$3-$2-$1 ', $alteredValue);
-
- try {
- $date = new \DateTimeImmutable($alteredValue);
- } catch (\Throwable $ex) {
- throw new InvalidDateHeaderException(\sprintf('Invalid Date header found: "%s"', $dateHeader), 0, $ex);
- }
-
- return $date;
- }
-
- /**
- * Get message size (from headers).
- *
- * @return null|int|string
- */
- final public function getSize()
- {
- $size = $this->getHeaders()->get('size');
- \assert(null === $size || \is_int($size) || \is_string($size));
-
- return $size;
- }
-
- /**
- * Get message subject (from headers).
- */
- final public function getSubject(): ?string
- {
- $subject = $this->getHeaders()->get('subject');
- \assert(null === $subject || \is_string($subject));
-
- return $subject;
- }
-
- /**
- * Get message In-Reply-To (from headers).
- *
- * @return string[]
- */
- final public function getInReplyTo(): array
- {
- $inReplyTo = $this->getHeaders()->get('in_reply_to');
- \assert(null === $inReplyTo || \is_string($inReplyTo));
-
- return null !== $inReplyTo ? \explode(' ', $inReplyTo) : [];
- }
-
- /**
- * Get message References (from headers).
- *
- * @return string[]
- */
- final public function getReferences(): array
- {
- $references = $this->getHeaders()->get('references');
- \assert(null === $references || \is_string($references));
-
- return null !== $references ? \explode(' ', $references) : [];
- }
-
- /**
- * Get first body HTML part.
- */
- final public function getBodyHtml(): ?string
- {
- $htmlParts = $this->getAllContentsBySubtype(self::SUBTYPE_HTML);
-
- return $htmlParts[0] ?? null;
- }
-
- /**
- * Get all contents parts of specific subtype (self::SUBTYPE_HTML or self::SUBTYPE_PLAIN).
- *
- * @return string[]
- */
- final public function getAllContentsBySubtype(string $subtype): array
- {
- $iterator = new \RecursiveIteratorIterator($this, \RecursiveIteratorIterator::SELF_FIRST);
- $parts = [];
- /** @var PartInterface $part */
- foreach ($iterator as $part) {
- if ($subtype === $part->getSubtype()) {
- $parts[] = $part->getDecodedContent();
- }
- }
- if (\count($parts) > 0) {
- return $parts;
- }
-
- // If message has no parts and is of right type, return content of message.
- if ($subtype === $this->getSubtype()) {
- return [$this->getDecodedContent()];
- }
-
- return [];
- }
-
- /**
- * Get body HTML parts.
- *
- * @return string[]
- */
- final public function getBodyHtmlParts(): array
- {
- return $this->getAllContentsBySubtype(self::SUBTYPE_HTML);
- }
-
- /**
- * Get all body HTML parts merged into 1 html.
- */
- final public function getCompleteBodyHtml(): ?string
- {
- $htmlParts = $this->getAllContentsBySubtype(self::SUBTYPE_HTML);
-
- if (1 === \count($htmlParts)) {
- return $htmlParts[0];
- }
- if (0 === \count($htmlParts)) {
- return null;
- }
- \libxml_use_internal_errors(true); // Suppress parse errors, get errors with libxml_get_errors();
-
- $newDom = new \DOMDocument();
-
- $newBody = '';
- $newDom->loadHTML(\implode('', $htmlParts));
-
- $bodyTags = $newDom->getElementsByTagName('body');
-
- foreach ($bodyTags as $body) {
- foreach ($body->childNodes as $node) {
- $newBody .= $newDom->saveHTML($node);
- }
- }
-
- $newDom = new \DOMDocument();
- $newDom->loadHTML($newBody);
-
- $completeHtml = $newDom->saveHTML();
-
- return false === $completeHtml ? null : $completeHtml;
- }
-
- /**
- * Get body text.
- */
- final public function getBodyText(): ?string
- {
- $plainParts = $this->getAllContentsBySubtype(self::SUBTYPE_PLAIN);
-
- return $plainParts[0] ?? null;
- }
-
- /**
- * Get all body PLAIN parts merged into 1 string.
- *
- * @return null|string Null if message has no PLAIN message parts
- */
- final public function getCompleteBodyText(): ?string
- {
- $plainParts = $this->getAllContentsBySubtype(self::SUBTYPE_PLAIN);
-
- if (1 === \count($plainParts)) {
- return $plainParts[0];
- }
- if (0 === \count($plainParts)) {
- return null;
- }
-
- return \implode("\n", $plainParts);
- }
-
- /**
- * Get attachments (if any) linked to this e-mail.
- *
- * @return AttachmentInterface[]
- */
- final public function getAttachments(): array
- {
- if (null === $this->attachments) {
- $this->attachments = self::gatherAttachments($this);
- }
-
- return $this->attachments;
- }
-
- /**
- * @param PartInterface $part
- *
- * @return Attachment[]
- */
- private static function gatherAttachments(PartInterface $part): array
- {
- $attachments = [];
- foreach ($part->getParts() as $childPart) {
- if ($childPart instanceof Attachment) {
- $attachments[] = $childPart;
- }
- if ($childPart->hasChildren()) {
- $attachments = [...$attachments, ...self::gatherAttachments($childPart)];
- }
- }
-
- return $attachments;
- }
-
- /**
- * Does this message have attachments?
- */
- final public function hasAttachments(): bool
- {
- return \count($this->getAttachments()) > 0;
- }
-
- /**
- * @param \stdClass[] $addresses
- *
- * @return EmailAddress[]
- */
- private function decodeEmailAddresses(array $addresses): array
- {
- $return = [];
- foreach ($addresses as $address) {
- if (isset($address->mailbox)) {
- $return[] = $this->decodeEmailAddress($address);
- }
- }
-
- return $return;
- }
-
- private function decodeEmailAddress(\stdClass $value): EmailAddress
- {
- return new EmailAddress($value->mailbox, $value->host, $value->personal);
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php
deleted file mode 100644
index 3adba507b..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AbstractPart.php
+++ /dev/null
@@ -1,448 +0,0 @@
- self::TYPE_TEXT,
- \TYPEMULTIPART => self::TYPE_MULTIPART,
- \TYPEMESSAGE => self::TYPE_MESSAGE,
- \TYPEAPPLICATION => self::TYPE_APPLICATION,
- \TYPEAUDIO => self::TYPE_AUDIO,
- \TYPEIMAGE => self::TYPE_IMAGE,
- \TYPEVIDEO => self::TYPE_VIDEO,
- \TYPEMODEL => self::TYPE_MODEL,
- \TYPEOTHER => self::TYPE_OTHER,
- ];
-
- private const ENCODINGS_MAP = [
- \ENC7BIT => self::ENCODING_7BIT,
- \ENC8BIT => self::ENCODING_8BIT,
- \ENCBINARY => self::ENCODING_BINARY,
- \ENCBASE64 => self::ENCODING_BASE64,
- \ENCQUOTEDPRINTABLE => self::ENCODING_QUOTED_PRINTABLE,
- ];
-
- private const ATTACHMENT_KEYS = [
- 'name' => true,
- 'filename' => true,
- 'name*' => true,
- 'filename*' => true,
- ];
-
- protected ImapResourceInterface $resource;
- private bool $structureParsed = false;
- /**
- * @var AbstractPart[]
- */
- private array $parts = [];
- private string $partNumber;
- private int $messageNumber;
- private \stdClass $structure;
- private Parameters $parameters;
- private ?string $type = null;
- private ?string $subtype = null;
- private ?string $encoding = null;
- private ?string $disposition = null;
- private ?string $description = null;
- private string|int|null $bytes;
- private ?string $lines = null;
- private ?string $content = null;
- private ?string $decodedContent = null;
- private int $key = 0;
-
- /**
- * Constructor.
- *
- * @param ImapResourceInterface $resource IMAP resource
- * @param int $messageNumber Message number
- * @param string $partNumber Part number
- * @param \stdClass $structure Part structure
- */
- public function __construct(
- ImapResourceInterface $resource,
- int $messageNumber,
- string $partNumber,
- \stdClass $structure
- ) {
- $this->resource = $resource;
- $this->messageNumber = $messageNumber;
- $this->partNumber = $partNumber;
- $this->setStructure($structure);
- }
-
- final public function getNumber(): int
- {
- $this->assertMessageExists($this->messageNumber);
-
- return $this->messageNumber;
- }
-
- /**
- * Ensure message exists.
- */
- protected function assertMessageExists(int $messageNumber): void
- {
- }
-
- /**
- * @param \stdClass $structure Part structure
- */
- final protected function setStructure(\stdClass $structure): void
- {
- $this->structure = $structure;
- }
-
- final public function getStructure(): \stdClass
- {
- $this->lazyLoadStructure();
-
- return $this->structure;
- }
-
- /**
- * Lazy load structure.
- */
- protected function lazyLoadStructure(): void
- {
- }
-
- final public function getParameters(): Parameters
- {
- $this->lazyParseStructure();
-
- return $this->parameters;
- }
-
- final public function getCharset(): ?string
- {
- $this->lazyParseStructure();
-
- $charset = $this->parameters->get('charset');
- \assert(null === $charset || \is_string($charset));
-
- return '' !== $charset ? $charset : null;
- }
-
- final public function getType(): ?string
- {
- $this->lazyParseStructure();
-
- return $this->type;
- }
-
- final public function getSubtype(): ?string
- {
- $this->lazyParseStructure();
-
- return $this->subtype;
- }
-
- final public function getEncoding(): ?string
- {
- $this->lazyParseStructure();
-
- return $this->encoding;
- }
-
- final public function getDisposition(): ?string
- {
- $this->lazyParseStructure();
-
- return $this->disposition;
- }
-
- final public function getDescription(): ?string
- {
- $this->lazyParseStructure();
-
- return $this->description;
- }
-
- final public function getBytes()
- {
- $this->lazyParseStructure();
-
- return $this->bytes;
- }
-
- final public function getLines(): ?string
- {
- $this->lazyParseStructure();
-
- return $this->lines;
- }
-
- final public function getContent(): string
- {
- if (null === $this->content) {
- $this->content = $this->doGetContent($this->getContentPartNumber());
- }
-
- return $this->content;
- }
-
- /**
- * Get content part number.
- */
- protected function getContentPartNumber(): string
- {
- return $this->partNumber;
- }
-
- final public function getPartNumber(): string
- {
- return $this->partNumber;
- }
-
- final public function getDecodedContent(): string
- {
- if (null === $this->decodedContent) {
- if (self::ENCODING_UNKNOWN === $this->getEncoding()) {
- throw new UnexpectedEncodingException('Cannot decode a content with an uknown encoding');
- }
-
- $content = $this->getContent();
- if (self::ENCODING_BASE64 === $this->getEncoding()) {
- $content = \base64_decode($content, false);
- } elseif (self::ENCODING_QUOTED_PRINTABLE === $this->getEncoding()) {
- $content = \quoted_printable_decode($content);
- }
-
- if (false === $content) {
- throw new UnexpectedEncodingException('Cannot decode content');
- }
-
- // If this part is a text part, convert its charset to UTF-8.
- // We don't want to decode an attachment's charset.
- if (!$this instanceof Attachment && null !== $this->getCharset() && self::TYPE_TEXT === $this->getType()) {
- $content = Transcoder::decode($content, $this->getCharset());
- }
-
- $this->decodedContent = $content;
- }
-
- return $this->decodedContent;
- }
-
- /**
- * Get raw message content.
- */
- final protected function doGetContent(string $partNumber): string
- {
- $return = \imap_fetchbody(
- $this->resource->getStream(),
- $this->getNumber(),
- $partNumber,
- \FT_UID | \FT_PEEK
- );
-
- if (false === $return) {
- throw new ImapFetchbodyException('imap_fetchbody failed');
- }
-
- return $return;
- }
-
- /**
- * Save raw message content to file.
- *
- * @param resource|string $file the path to the saved file as a string, or a valid file descriptor
- */
- final protected function doSaveContent($file, string $partNumber): void
- {
- $return = \imap_savebody(
- $this->resource->getStream(),
- $file,
- $this->getNumber(),
- $partNumber,
- \FT_UID | \FT_PEEK
- );
-
- if (false === $return) {
- throw new ImapFetchbodyException('imap_savebody failed');
- }
- }
-
- final public function getParts(): array
- {
- $this->lazyParseStructure();
-
- return $this->parts;
- }
-
- /**
- * Get current child part.
- */
- #[\ReturnTypeWillChange]
- final public function current()
- {
- $this->lazyParseStructure();
-
- return $this->parts[$this->key];
- }
-
- #[\ReturnTypeWillChange]
- final public function getChildren()
- {
- return $this->current();
- }
-
- #[\ReturnTypeWillChange]
- final public function hasChildren()
- {
- $this->lazyParseStructure();
-
- return \count($this->parts) > 0;
- }
-
- /**
- * @return int
- */
- #[\ReturnTypeWillChange]
- final public function key()
- {
- return $this->key;
- }
-
- #[\ReturnTypeWillChange]
- final public function next()
- {
- ++$this->key;
- }
-
- #[\ReturnTypeWillChange]
- final public function rewind()
- {
- $this->key = 0;
- }
-
- #[\ReturnTypeWillChange]
- final public function valid()
- {
- $this->lazyParseStructure();
-
- return isset($this->parts[$this->key]);
- }
-
- /**
- * Parse part structure.
- */
- private function lazyParseStructure(): void
- {
- if (true === $this->structureParsed) {
- return;
- }
- $this->structureParsed = true;
-
- $this->lazyLoadStructure();
-
- $this->type = self::TYPES_MAP[$this->structure->type] ?? self::TYPE_UNKNOWN;
-
- // In our context, \ENCOTHER is as useful as an unknown encoding
- $this->encoding = self::ENCODINGS_MAP[$this->structure->encoding] ?? self::ENCODING_UNKNOWN;
- if (isset($this->structure->subtype)) {
- $this->subtype = $this->structure->subtype;
- }
-
- if (isset($this->structure->bytes)) {
- $this->bytes = $this->structure->bytes;
- }
- if ($this->structure->ifdisposition) {
- $this->disposition = $this->structure->disposition;
- }
- if ($this->structure->ifdescription) {
- $this->description = $this->structure->description;
- }
-
- $this->parameters = new Parameters();
- if ($this->structure->ifparameters) {
- $this->parameters->add($this->structure->parameters);
- }
-
- if ($this->structure->ifdparameters) {
- $this->parameters->add($this->structure->dparameters);
- }
-
- // When the message is not multipart and the body is the attachment content
- // Prevents infinite recursion
- if (!$this instanceof Attachment && self::isAttachment($this->structure)) {
- $this->parts[] = new Attachment($this->resource, $this->getNumber(), '1', $this->structure);
- }
-
- if (isset($this->structure->parts)) {
- $parts = $this->structure->parts;
- // https://secure.php.net/manual/en/function.imap-fetchbody.php#89002
- if ($this instanceof Attachment && $this->isEmbeddedMessage() && 1 === \count($parts) && \TYPEMULTIPART === $parts[0]->type) {
- $parts = $parts[0]->parts;
- }
- foreach ($parts as $key => $partStructure) {
- $partNumber = (!$this instanceof Message) ? $this->partNumber . '.' : '';
- $partNumber .= $key + 1;
-
- $newPartClass = self::isAttachment($partStructure)
- ? Attachment::class
- : SimplePart::class;
-
- $this->parts[] = new $newPartClass($this->resource, $this->getNumber(), $partNumber, $partStructure);
- }
- }
- }
-
- /**
- * Check if the given part is an attachment.
- */
- private static function isAttachment(\stdClass $part): bool
- {
- if (isset(self::TYPES_MAP[$part->type]) && self::TYPE_MULTIPART === self::TYPES_MAP[$part->type]) {
- return false;
- }
-
- // Attachment with correct Content-Disposition header
- if ($part->ifdisposition) {
- if ('attachment' === \strtolower($part->disposition)) {
- return true;
- }
-
- if (
- 'inline' === \strtolower($part->disposition)
- && self::SUBTYPE_PLAIN !== \strtoupper($part->subtype)
- && self::SUBTYPE_HTML !== \strtoupper($part->subtype)
- ) {
- return true;
- }
- }
-
- // Attachment without Content-Disposition header
- if ($part->ifparameters) {
- foreach ($part->parameters as $parameter) {
- if (isset(self::ATTACHMENT_KEYS[\strtolower($parameter->attribute)])) {
- return true;
- }
- }
- }
-
- /*
- if ($part->ifdparameters) {
- foreach ($part->dparameters as $parameter) {
- if (isset(self::$attachmentKeys[\strtolower($parameter->attribute)])) {
- return true;
- }
- }
- }
- */
-
- return self::SUBTYPE_RFC822 === \strtoupper($part->subtype);
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Attachment.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Attachment.php
deleted file mode 100644
index b134b8d91..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Attachment.php
+++ /dev/null
@@ -1,53 +0,0 @@
-getParameters()->get('filename');
- if (null === $filename || '' === $filename) {
- $filename = $this->getParameters()->get('name');
- }
- \assert(null === $filename || \is_string($filename));
-
- return $filename;
- }
-
- public function getSize()
- {
- $size = $this->getParameters()->get('size');
- if (\is_numeric($size)) {
- $size = (int) $size;
- }
- \assert(null === $size || \is_int($size));
-
- return $size;
- }
-
- public function isEmbeddedMessage(): bool
- {
- return self::TYPE_MESSAGE === $this->getType();
- }
-
- public function getEmbeddedMessage(): EmbeddedMessageInterface
- {
- if (!$this->isEmbeddedMessage()) {
- throw new NotEmbeddedMessageException(\sprintf(
- 'Attachment "%s" in message "%s" is not embedded message',
- $this->getPartNumber(),
- $this->getNumber()
- ));
- }
-
- return new EmbeddedMessage($this->resource, $this->getNumber(), $this->getPartNumber(), $this->getStructure()->parts[0]);
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AttachmentInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AttachmentInterface.php
deleted file mode 100644
index 286e18885..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/AttachmentInterface.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- */
- public function getEmbeddedMessage(): EmbeddedMessageInterface;
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/BasicMessageInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/BasicMessageInterface.php
deleted file mode 100644
index 95d3f26d6..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/BasicMessageInterface.php
+++ /dev/null
@@ -1,169 +0,0 @@
-
- */
- public function getId(): ?string;
-
- /**
- * Get message sender (from headers).
- */
- public function getFrom(): ?EmailAddress;
-
- /**
- * Get To recipients.
- *
- * @return EmailAddress[] Empty array in case message has no To: recipients
- */
- public function getTo(): array;
-
- /**
- * Get Cc recipients.
- *
- * @return EmailAddress[] Empty array in case message has no CC: recipients
- */
- public function getCc(): array;
-
- /**
- * Get Bcc recipients.
- *
- * @return EmailAddress[] Empty array in case message has no BCC: recipients
- */
- public function getBcc(): array;
-
- /**
- * Get Reply-To recipients.
- *
- * @return EmailAddress[] Empty array in case message has no Reply-To: recipients
- */
- public function getReplyTo(): array;
-
- /**
- * Get Sender.
- *
- * @return EmailAddress[] Empty array in case message has no Sender: recipients
- */
- public function getSender(): array;
-
- /**
- * Get Return-Path.
- *
- * @return EmailAddress[] Empty array in case message has no Return-Path: recipients
- */
- public function getReturnPath(): array;
-
- /**
- * Get date (from headers).
- */
- public function getDate(): ?\DateTimeImmutable;
-
- /**
- * Get message size (from headers).
- *
- * @return null|int|string
- */
- public function getSize();
-
- /**
- * Get message subject (from headers).
- */
- public function getSubject(): ?string;
-
- /**
- * Get message In-Reply-To (from headers).
- *
- * @return string[]
- */
- public function getInReplyTo(): array;
-
- /**
- * Get message References (from headers).
- *
- * @return string[]
- */
- public function getReferences(): array;
-
- /**
- * Get message parts by type.
- *
- * @return string[]
- */
- public function getAllContentsBySubtype(string $subtype): array;
-
- /**
- * Get first body HTML part.
- *
- * @return null|string Null if message has no HTML message part
- */
- public function getBodyHtml(): ?string;
-
- /**
- * Get all body HTML parts as array.
- *
- * @return string[]
- */
- public function getBodyHtmlParts(): array;
-
- /**
- * Get all body HTML parts merged into 1 html.
- *
- * @return null|string Null if message has no HTML message parts
- */
- public function getCompleteBodyHtml(): ?string;
-
- /**
- * Get body text.
- */
- public function getBodyText(): ?string;
-
- /**
- * Get all body PLAIN parts merged into 1 string.
- *
- * @return null|string Null if message has no PLAIN message parts
- */
- public function getCompleteBodyText(): ?string;
-
- /**
- * Get attachments (if any) linked to this e-mail.
- *
- * @return AttachmentInterface[]
- */
- public function getAttachments(): array;
-
- /**
- * Does this message have attachments?
- */
- public function hasAttachments(): bool;
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php
deleted file mode 100644
index 4833487dd..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmailAddress.php
+++ /dev/null
@@ -1,70 +0,0 @@
-mailbox = $mailbox;
- $this->hostname = $hostname;
- $this->name = $name;
- $this->address = null;
-
- if (null !== $hostname) {
- $this->address = $mailbox . '@' . $hostname;
- }
- }
-
- /**
- * @return null|string
- */
- public function getAddress()
- {
- return $this->address;
- }
-
- /**
- * Returns address with person name.
- */
- public function getFullAddress(): string
- {
- $address = \sprintf('%s@%s', $this->mailbox, $this->hostname);
- if (null !== $this->name) {
- $address = \sprintf('"%s" <%s>', \addcslashes($this->name, '"'), $address);
- }
-
- return $address;
- }
-
- public function getMailbox(): string
- {
- return $this->mailbox;
- }
-
- /**
- * @return null|string
- */
- public function getHostname()
- {
- return $this->hostname;
- }
-
- /**
- * @return null|string
- */
- public function getName()
- {
- return $this->name;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessage.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessage.php
deleted file mode 100644
index 80f542b2d..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessage.php
+++ /dev/null
@@ -1,61 +0,0 @@
-headers) {
- $this->headers = new Headers(\imap_rfc822_parse_headers($this->getRawHeaders()));
- }
-
- return $this->headers;
- }
-
- public function getRawHeaders(): string
- {
- if (null === $this->rawHeaders) {
- $rawHeaders = \explode("\r\n\r\n", $this->getRawMessage(), 2);
- $this->rawHeaders = \current($rawHeaders);
- }
-
- return $this->rawHeaders;
- }
-
- public function getRawMessage(): string
- {
- if (null === $this->rawMessage) {
- $this->rawMessage = $this->doGetContent($this->getPartNumber());
- }
-
- return $this->rawMessage;
- }
-
- /**
- * @param resource|string $file the path to the saved file as a string, or a valid file descriptor
- */
- public function saveRawMessage($file): void
- {
- $this->doSaveContent($file, $this->getPartNumber());
- }
-
- /**
- * Get content part number.
- */
- protected function getContentPartNumber(): string
- {
- $partNumber = $this->getPartNumber();
- if (0 === \count($this->getParts())) {
- $partNumber .= '.1';
- }
-
- return $partNumber;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessageInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessageInterface.php
deleted file mode 100644
index c685edf94..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/EmbeddedMessageInterface.php
+++ /dev/null
@@ -1,9 +0,0 @@
- $value) {
- try {
- $this[$key] = $this->parseHeader($key, $value);
- } catch (UnsupportedCharsetException) {
- // safely skip header with unsupported charset
- }
- }
- }
-
- /**
- * Get header.
- *
- * @return null|int|\stdClass[]|string
- */
- public function get(string $key)
- {
- return parent::get(\strtolower($key));
- }
-
- /**
- * Parse header.
- *
- * @param int|\stdClass[]|string $value
- *
- * @return int|\stdClass[]|string
- */
- private function parseHeader(string $key, $value)
- {
- switch ($key) {
- case 'msgno':
- \assert(\is_string($value));
-
- return (int) $value;
- case 'from':
- case 'to':
- case 'cc':
- case 'bcc':
- case 'reply_to':
- case 'sender':
- case 'return_path':
- \assert(\is_array($value));
- foreach ($value as $address) {
- if (isset($address->mailbox)) {
- $address->host = $address->host ?? null;
- $address->personal = isset($address->personal) ? $this->decode($address->personal) : null;
- }
- }
-
- return $value;
- case 'date':
- case 'subject':
- \assert(\is_string($value));
-
- return $this->decode($value);
- }
-
- return $value;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Parameters.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Parameters.php
deleted file mode 100644
index 37ed8166a..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/Parameters.php
+++ /dev/null
@@ -1,70 +0,0 @@
-
- */
-class Parameters extends \ArrayIterator
-{
- /**
- * @var array
- */
- private static array $attachmentCustomKeys = [
- 'name*' => 'name',
- 'filename*' => 'filename',
- ];
-
- /**
- * @param \stdClass[] $parameters
- */
- public function add(array $parameters = []): void
- {
- foreach ($parameters as $parameter) {
- $key = \strtolower($parameter->attribute);
- if (isset(self::$attachmentCustomKeys[$key])) {
- $key = self::$attachmentCustomKeys[$key];
- }
- $value = $this->decode($parameter->value);
- $this[$key] = $value;
- }
- }
-
- /**
- * @return null|int|\stdClass[]|string
- */
- public function get(string $key)
- {
- return $this[$key] ?? null;
- }
-
- final protected function decode(string $value): string
- {
- $parts = \imap_mime_header_decode($value);
- if (!\is_array($parts)) {
- return $value;
- }
-
- $decoded = '';
- foreach ($parts as $part) {
- $text = $part->text;
- if ('default' !== $part->charset) {
- $text = Transcoder::decode($text, $part->charset);
- }
- // RFC2231
- if (1 === \preg_match('/^(?[^\']+)\'[^\']*?\'(?.+)$/', $text, $matches)) {
- $hasInvalidChars = 1 === \preg_match('#[^%a-zA-Z0-9\-_\.\+]#', $matches['urltext']);
- $hasEscapedChars = 1 === \preg_match('#%[a-zA-Z0-9]{2}#', $matches['urltext']);
- if (!$hasInvalidChars && $hasEscapedChars) {
- $text = Transcoder::decode(\urldecode($matches['urltext']), $matches['encoding']);
- }
- }
-
- $decoded .= $text;
- }
-
- return $decoded;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/PartInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Message/PartInterface.php
deleted file mode 100644
index 70a83f2ce..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Message/PartInterface.php
+++ /dev/null
@@ -1,112 +0,0 @@
- 'Shift_JIS',
- '129' => 'EUC-KR',
- '134' => 'GB2312',
- '136' => 'Big5',
- '161' => 'windows-1253',
- '162' => 'windows-1254',
- '177' => 'windows-1255',
- '178' => 'windows-1256',
- '186' => 'windows-1257',
- '204' => 'windows-1251',
- '222' => 'windows-874',
- '238' => 'windows-1250',
- '5601' => 'EUC-KR',
- '646' => 'us-ascii',
- '850' => 'IBM850',
- '852' => 'IBM852',
- '855' => 'IBM855',
- '857' => 'IBM857',
- '862' => 'IBM862',
- '864' => 'IBM864',
- '864i' => 'IBM864i',
- '866' => 'IBM866',
- 'ansi-1251' => 'windows-1251',
- 'ansi_x3.4-1968' => 'us-ascii',
- 'arabic' => 'ISO-8859-6',
- 'ascii' => 'us-ascii',
- 'asmo-708' => 'ISO-8859-6',
- 'big5-hkscs' => 'Big5',
- 'chinese' => 'GB2312',
- 'cn-big5' => 'Big5',
- 'cns11643' => 'x-euc-tw',
- 'cp-866' => 'IBM866',
- 'cp1250' => 'windows-1250',
- 'cp1251' => 'windows-1251',
- 'cp1252' => 'windows-1252',
- 'cp1253' => 'windows-1253',
- 'cp1254' => 'windows-1254',
- 'cp1255' => 'windows-1255',
- 'cp1256' => 'windows-1256',
- 'cp1257' => 'windows-1257',
- 'cp1258' => 'windows-1258',
- 'cp819' => 'ISO-8859-1',
- 'cp850' => 'IBM850',
- 'cp852' => 'IBM852',
- 'cp855' => 'IBM855',
- 'cp857' => 'IBM857',
- 'cp862' => 'IBM862',
- 'cp864' => 'IBM864',
- 'cp864i' => 'IBM864i',
- 'cp866' => 'IBM866',
- 'cp932' => 'Shift_JIS',
- 'csbig5' => 'Big5',
- 'cseucjpkdfmtjapanese' => 'EUC-JP',
- 'cseuckr' => 'EUC-KR',
- 'cseucpkdfmtjapanese' => 'EUC-JP',
- 'csgb2312' => 'GB2312',
- 'csibm850' => 'IBM850',
- 'csibm852' => 'IBM852',
- 'csibm855' => 'IBM855',
- 'csibm857' => 'IBM857',
- 'csibm862' => 'IBM862',
- 'csibm864' => 'IBM864',
- 'csibm864i' => 'IBM864i',
- 'csibm866' => 'IBM866',
- 'csiso103t618bit' => 'T.61-8bit',
- 'csiso111ecmacyrillic' => 'ISO-IR-111',
- 'csiso2022jp' => 'ISO-2022-JP',
- 'csiso2022jp2' => 'ISO-2022-JP',
- 'csiso2022kr' => 'ISO-2022-KR',
- 'csiso58gb231280' => 'GB2312',
- 'csiso88596e' => 'ISO-8859-6-E',
- 'csiso88596i' => 'ISO-8859-6-I',
- 'csiso88598e' => 'ISO-8859-8-E',
- 'csiso88598i' => 'ISO-8859-8-I',
- 'csisolatin1' => 'ISO-8859-1',
- 'csisolatin2' => 'ISO-8859-2',
- 'csisolatin3' => 'ISO-8859-3',
- 'csisolatin4' => 'ISO-8859-4',
- 'csisolatin5' => 'ISO-8859-9',
- 'csisolatin6' => 'ISO-8859-10',
- 'csisolatin9' => 'ISO-8859-15',
- 'csisolatinarabic' => 'ISO-8859-6',
- 'csisolatincyrillic' => 'ISO-8859-5',
- 'csisolatingreek' => 'ISO-8859-7',
- 'csisolatinhebrew' => 'ISO-8859-8',
- 'cskoi8r' => 'KOI8-R',
- 'csksc56011987' => 'EUC-KR',
- 'csmacintosh' => 'x-mac-roman',
- 'csshiftjis' => 'Shift_JIS',
- 'csueckr' => 'EUC-KR',
- 'csunicode' => 'UTF-16BE',
- 'csunicode11' => 'UTF-16BE',
- 'csunicode11utf7' => 'UTF-7',
- 'csunicodeascii' => 'UTF-16BE',
- 'csunicodelatin1' => 'UTF-16BE',
- 'csviqr' => 'VIQR',
- 'csviscii' => 'VISCII',
- 'cyrillic' => 'ISO-8859-5',
- 'dos-874' => 'windows-874',
- 'ecma-114' => 'ISO-8859-6',
- 'ecma-118' => 'ISO-8859-7',
- 'ecma-cyrillic' => 'ISO-IR-111',
- 'elot_928' => 'ISO-8859-7',
- 'gb_2312' => 'GB2312',
- 'gb_2312-80' => 'GB2312',
- 'greek' => 'ISO-8859-7',
- 'greek8' => 'ISO-8859-7',
- 'hebrew' => 'ISO-8859-8',
- 'ibm-864' => 'IBM864',
- 'ibm-864i' => 'IBM864i',
- 'ibm819' => 'ISO-8859-1',
- 'ibm874' => 'windows-874',
- 'iso-10646' => 'UTF-16BE',
- 'iso-10646-j-1' => 'UTF-16BE',
- 'iso-10646-ucs-2' => 'UTF-16BE',
- 'iso-10646-ucs-4' => 'UTF-32BE',
- 'iso-10646-ucs-basic' => 'UTF-16BE',
- 'iso-10646-unicode-latin1' => 'UTF-16BE',
- 'iso-2022-cn-ext' => 'ISO-2022-CN',
- 'iso-2022-jp-2' => 'ISO-2022-JP',
- 'iso-8859-8i' => 'ISO-8859-8-I',
- 'iso-ir-100' => 'ISO-8859-1',
- 'iso-ir-101' => 'ISO-8859-2',
- 'iso-ir-103' => 'T.61-8bit',
- 'iso-ir-109' => 'ISO-8859-3',
- 'iso-ir-110' => 'ISO-8859-4',
- 'iso-ir-126' => 'ISO-8859-7',
- 'iso-ir-127' => 'ISO-8859-6',
- 'iso-ir-138' => 'ISO-8859-8',
- 'iso-ir-144' => 'ISO-8859-5',
- 'iso-ir-148' => 'ISO-8859-9',
- 'iso-ir-149' => 'EUC-KR',
- 'iso-ir-157' => 'ISO-8859-10',
- 'iso-ir-58' => 'GB2312',
- 'iso8859-1' => 'ISO-8859-1',
- 'iso8859-10' => 'ISO-8859-10',
- 'iso8859-11' => 'ISO-8859-11',
- 'iso8859-13' => 'ISO-8859-13',
- 'iso8859-14' => 'ISO-8859-14',
- 'iso8859-15' => 'ISO-8859-15',
- 'iso8859-2' => 'ISO-8859-2',
- 'iso8859-3' => 'ISO-8859-3',
- 'iso8859-4' => 'ISO-8859-4',
- 'iso8859-5' => 'ISO-8859-5',
- 'iso8859-6' => 'ISO-8859-6',
- 'iso8859-7' => 'ISO-8859-7',
- 'iso8859-8' => 'ISO-8859-8',
- 'iso8859-9' => 'ISO-8859-9',
- 'iso88591' => 'ISO-8859-1',
- 'iso885910' => 'ISO-8859-10',
- 'iso885911' => 'ISO-8859-11',
- 'iso885912' => 'ISO-8859-12',
- 'iso885913' => 'ISO-8859-13',
- 'iso885914' => 'ISO-8859-14',
- 'iso885915' => 'ISO-8859-15',
- 'iso88592' => 'ISO-8859-2',
- 'iso88593' => 'ISO-8859-3',
- 'iso88594' => 'ISO-8859-4',
- 'iso88595' => 'ISO-8859-5',
- 'iso88596' => 'ISO-8859-6',
- 'iso88597' => 'ISO-8859-7',
- 'iso88598' => 'ISO-8859-8',
- 'iso88599' => 'ISO-8859-9',
- 'iso_8859-1' => 'ISO-8859-1',
- 'iso_8859-15' => 'ISO-8859-15',
- 'iso_8859-1:1987' => 'ISO-8859-1',
- 'iso_8859-2' => 'ISO-8859-2',
- 'iso_8859-2:1987' => 'ISO-8859-2',
- 'iso_8859-3' => 'ISO-8859-3',
- 'iso_8859-3:1988' => 'ISO-8859-3',
- 'iso_8859-4' => 'ISO-8859-4',
- 'iso_8859-4:1988' => 'ISO-8859-4',
- 'iso_8859-5' => 'ISO-8859-5',
- 'iso_8859-5:1988' => 'ISO-8859-5',
- 'iso_8859-6' => 'ISO-8859-6',
- 'iso_8859-6:1987' => 'ISO-8859-6',
- 'iso_8859-7' => 'ISO-8859-7',
- 'iso_8859-7:1987' => 'ISO-8859-7',
- 'iso_8859-8' => 'ISO-8859-8',
- 'iso_8859-8:1988' => 'ISO-8859-8',
- 'iso_8859-9' => 'ISO-8859-9',
- 'iso_8859-9:1989' => 'ISO-8859-9',
- 'koi' => 'KOI8-R',
- 'koi8' => 'KOI8-R',
- 'koi8-ru' => 'KOI8-U',
- 'koi8_r' => 'KOI8-R',
- 'korean' => 'EUC-KR',
- 'ks_c_5601-1987' => 'EUC-KR',
- 'ks_c_5601-1989' => 'EUC-KR',
- 'ksc5601' => 'EUC-KR',
- 'ksc_5601' => 'EUC-KR',
- 'l1' => 'ISO-8859-1',
- 'l2' => 'ISO-8859-2',
- 'l3' => 'ISO-8859-3',
- 'l4' => 'ISO-8859-4',
- 'l5' => 'ISO-8859-9',
- 'l6' => 'ISO-8859-10',
- 'l9' => 'ISO-8859-15',
- 'latin1' => 'ISO-8859-1',
- 'latin2' => 'ISO-8859-2',
- 'latin3' => 'ISO-8859-3',
- 'latin4' => 'ISO-8859-4',
- 'latin5' => 'ISO-8859-9',
- 'latin6' => 'ISO-8859-10',
- 'logical' => 'ISO-8859-8-I',
- 'mac' => 'x-mac-roman',
- 'macintosh' => 'x-mac-roman',
- 'ms932' => 'Shift_JIS',
- 'ms_kanji' => 'Shift_JIS',
- 'shift-jis' => 'Shift_JIS',
- 'sjis' => 'Shift_JIS',
- 'sun_eu_greek' => 'ISO-8859-7',
- 't.61' => 'T.61-8bit',
- 'tis620' => 'TIS-620',
- 'unicode-1-1-utf-7' => 'UTF-7',
- 'unicode-1-1-utf-8' => 'UTF-8',
- 'unicode-2-0-utf-7' => 'UTF-7',
- 'visual' => 'ISO-8859-8',
- 'windows-31j' => 'Shift_JIS',
- 'windows-949' => 'EUC-KR',
- 'x-cp1250' => 'windows-1250',
- 'x-cp1251' => 'windows-1251',
- 'x-cp1252' => 'windows-1252',
- 'x-cp1253' => 'windows-1253',
- 'x-cp1254' => 'windows-1254',
- 'x-cp1255' => 'windows-1255',
- 'x-cp1256' => 'windows-1256',
- 'x-cp1257' => 'windows-1257',
- 'x-cp1258' => 'windows-1258',
- 'x-euc-jp' => 'EUC-JP',
- 'x-gbk' => 'gbk',
- 'x-iso-10646-ucs-2-be' => 'UTF-16BE',
- 'x-iso-10646-ucs-2-le' => 'UTF-16LE',
- 'x-iso-10646-ucs-4-be' => 'UTF-32BE',
- 'x-iso-10646-ucs-4-le' => 'UTF-32LE',
- 'x-mac-ce' => 'windows-1250',
- 'x-sjis' => 'Shift_JIS',
- 'x-unicode-2-0-utf-7' => 'UTF-7',
- 'x-x-big5' => 'Big5',
- 'zh_cn.euc' => 'GB2312',
- 'zh_tw-big5' => 'Big5',
- 'zh_tw-euc' => 'x-euc-tw',
- ];
-
- /**
- * Decode text to UTF-8.
- *
- * @param string $text Text to decode
- * @param string $fromCharset Original charset
- */
- public static function decode(string $text, string $fromCharset): string
- {
- static $utf8Aliases = [
- 'unicode-1-1-utf-8' => true,
- 'utf8' => true,
- 'utf-8' => true,
- 'UTF8' => true,
- 'UTF-8' => true,
- ];
-
- if (isset($utf8Aliases[$fromCharset])) {
- return $text;
- }
-
- $originalFromCharset = $fromCharset;
- $lowercaseFromCharset = \strtolower($fromCharset);
- if (isset(self::CHARSET_ALIASES[$lowercaseFromCharset])) {
- $fromCharset = self::CHARSET_ALIASES[$lowercaseFromCharset];
- }
-
- \set_error_handler(static function (): bool {
- return true;
- });
-
- $iconvDecodedText = \iconv($fromCharset, 'UTF-8', $text);
- if (false === $iconvDecodedText) {
- $iconvDecodedText = \iconv($originalFromCharset, 'UTF-8', $text);
- }
-
- \restore_error_handler();
-
- if (false !== $iconvDecodedText) {
- return $iconvDecodedText;
- }
-
- $errorMessage = null;
- $errorNumber = 0;
- \set_error_handler(static function ($nr, $message) use (&$errorMessage, &$errorNumber): bool {
- $errorMessage = $message;
- $errorNumber = $nr;
-
- return true;
- });
-
- $decodedText = '';
-
- try {
- $decodedText = \mb_convert_encoding($text, 'UTF-8', $fromCharset);
- } catch (\Error $error) {
- $errorMessage = $error->getMessage();
- }
-
- \restore_error_handler();
-
- if (null !== $errorMessage) {
- throw new UnsupportedCharsetException(\sprintf(
- 'Unsupported charset "%s"%s: %s',
- $originalFromCharset,
- ($fromCharset !== $originalFromCharset) ? \sprintf(' (alias found: "%s")', $fromCharset) : '',
- $errorMessage
- ), $errorNumber);
- }
-
- return $decodedText;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/MessageInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/MessageInterface.php
deleted file mode 100644
index e8fe5f761..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/MessageInterface.php
+++ /dev/null
@@ -1,110 +0,0 @@
-
- */
-final class MessageIterator extends \ArrayIterator implements MessageIteratorInterface
-{
- private ImapResourceInterface $resource;
-
- /**
- * Constructor.
- *
- * @param ImapResourceInterface $resource IMAP resource
- * @param int[] $messageNumbers Array of message numbers
- */
- public function __construct(ImapResourceInterface $resource, array $messageNumbers)
- {
- $this->resource = $resource;
-
- parent::__construct($messageNumbers);
- }
-
- /**
- * Get current message.
- *
- * @return MessageInterface
- */
- public function current(): MessageInterface
- {
- $current = parent::current();
- if (!\is_int($current)) {
- throw new Exception\OutOfBoundsException(\sprintf(
- 'The current value "%s" isn\'t an integer and doesn\'t represent a message;'
- . ' try to cycle this "%s" with a native php function like foreach or with the method getArrayCopy(),'
- . ' or check it by calling the methods valid().',
- \get_debug_type($current),
- self::class
- ));
- }
-
- return new Message($this->resource, $current);
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/MessageIteratorInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/MessageIteratorInterface.php
deleted file mode 100644
index 736084b18..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/MessageIteratorInterface.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
- */
-interface MessageIteratorInterface extends \Iterator, \Countable
-{
- /**
- * Get current message.
- *
- * @return MessageInterface
- */
- public function current(): MessageInterface;
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/AbstractDate.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Search/AbstractDate.php
deleted file mode 100644
index 58dbff232..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/AbstractDate.php
+++ /dev/null
@@ -1,45 +0,0 @@
-date = $date;
- $this->dateFormat = $dateFormat;
- }
-
- /**
- * Converts the condition to a string that can be sent to the IMAP server.
- */
- final public function toString(): string
- {
- return \sprintf('%s "%s"', $this->getKeyword(), $this->date->format($this->dateFormat));
- }
-
- /**
- * Returns the keyword that the condition represents.
- */
- abstract protected function getKeyword(): string;
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/AbstractText.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Search/AbstractText.php
deleted file mode 100644
index 8b605ce22..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/AbstractText.php
+++ /dev/null
@@ -1,40 +0,0 @@
-text = $text;
- }
-
- /**
- * Converts the condition to a string that can be sent to the IMAP server.
- */
- final public function toString(): string
- {
- return \sprintf('%s "%s"', $this->getKeyword(), $this->text);
- }
-
- /**
- * Returns the keyword that the condition represents.
- */
- abstract protected function getKeyword(): string;
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/ConditionInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Search/ConditionInterface.php
deleted file mode 100644
index 3aed28c9c..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/ConditionInterface.php
+++ /dev/null
@@ -1,16 +0,0 @@
-addCondition($condition);
- }
- }
-
- /**
- * Adds a new condition to the expression.
- *
- * @param ConditionInterface $condition the condition to be added
- *
- * @return void
- */
- private function addCondition(ConditionInterface $condition)
- {
- $this->conditions[] = $condition;
- }
-
- /**
- * Returns the keyword that the condition represents.
- */
- public function toString(): string
- {
- $conditions = \array_map(static function (ConditionInterface $condition): string {
- return $condition->toString();
- }, $this->conditions);
-
- return \sprintf('( %s )', \implode(' OR ', $conditions));
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/RawExpression.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Search/RawExpression.php
deleted file mode 100644
index deda65d35..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/RawExpression.php
+++ /dev/null
@@ -1,29 +0,0 @@
-expression = $expression;
- }
-
- public function toString(): string
- {
- return $this->expression;
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/State/Deleted.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Search/State/Deleted.php
deleted file mode 100644
index b74581e03..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Search/State/Deleted.php
+++ /dev/null
@@ -1,22 +0,0 @@
-conditions[] = $condition;
-
- return $this;
- }
-
- /**
- * Converts the expression to a string that can be sent to the IMAP server.
- */
- public function toString(): string
- {
- $conditions = \array_map(static function (ConditionInterface $condition): string {
- return $condition->toString();
- }, $this->conditions);
-
- return \implode(' ', $conditions);
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/Server.php b/data/web/inc/lib/vendor/ddeboer/imap/src/Server.php
deleted file mode 100644
index 8a5a1b8f8..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/Server.php
+++ /dev/null
@@ -1,126 +0,0 @@
-hostname = $hostname;
- $this->port = $port;
- $this->flags = '' !== $flags ? '/' . \ltrim($flags, '/') : '';
- $this->parameters = $parameters;
- $this->options = $options;
- $this->retries = $retries;
- }
-
- /**
- * Authenticate connection.
- *
- * @param string $username Username
- * @param string $password Password
- *
- * @throws AuthenticationFailedException
- */
- public function authenticate(string $username, string $password): ConnectionInterface
- {
- $errorMessage = null;
- $errorNumber = 0;
- \set_error_handler(static function ($nr, $message) use (&$errorMessage, &$errorNumber): bool {
- $errorMessage = $message;
- $errorNumber = $nr;
-
- return true;
- });
-
- $resource = \imap_open(
- $this->getServerString(),
- $username,
- $password,
- $this->options,
- $this->retries,
- $this->parameters
- );
-
- \restore_error_handler();
-
- if (false === $resource || null !== $errorMessage) {
- throw new AuthenticationFailedException(\sprintf(
- 'Authentication failed for user "%s"%s',
- $username,
- null !== $errorMessage ? ': ' . $errorMessage : ''
- ), $errorNumber);
- }
-
- $check = \imap_check($resource);
-
- if (false === $check) {
- throw new ResourceCheckFailureException('Resource check failure');
- }
-
- $mailbox = $check->Mailbox;
- $connection = $mailbox;
- $curlyPosition = \strpos($mailbox, '}');
- if (false !== $curlyPosition) {
- $connection = \substr($mailbox, 0, $curlyPosition + 1);
- }
-
- // These are necessary to get rid of PHP throwing IMAP errors
- \imap_errors();
- \imap_alerts();
-
- return new Connection(new ImapResource($resource), $connection);
- }
-
- /**
- * Glues hostname, port and flags and returns result.
- */
- private function getServerString(): string
- {
- return \sprintf(
- '{%s%s%s}',
- $this->hostname,
- '' !== $this->port ? ':' . $this->port : '',
- $this->flags
- );
- }
-}
diff --git a/data/web/inc/lib/vendor/ddeboer/imap/src/ServerInterface.php b/data/web/inc/lib/vendor/ddeboer/imap/src/ServerInterface.php
deleted file mode 100644
index f7e95f968..000000000
--- a/data/web/inc/lib/vendor/ddeboer/imap/src/ServerInterface.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
- */
-final class RawMessageIterator extends \ArrayIterator implements MessageIteratorInterface
-{
- /**
- * @return MessageInterface
- */
- public function current(): MessageInterface
- {
- return parent::current();
- }
-}
diff --git a/data/web/inc/twig.inc.php b/data/web/inc/twig.inc.php
index c4d0669d9..14be6dc27 100644
--- a/data/web/inc/twig.inc.php
+++ b/data/web/inc/twig.inc.php
@@ -18,7 +18,7 @@ $twig->addFunction(new TwigFunction('query_string', function (array $params = []
return http_build_query(array_merge($filtered, $params));
}));
-$twig->addFunction(new TwigFunction('is_uri', function (string $uri, string $where = null) {
+$twig->addFunction(new TwigFunction('is_uri', function (string $uri, ?string $where = null) {
if (is_null($where)) $where = $_SERVER['REQUEST_URI'];
return preg_match('/'.$uri.'/i', $where);
}));
diff --git a/data/web/json_api.php b/data/web/json_api.php
index ec1a67f50..3694fe1b5 100644
--- a/data/web/json_api.php
+++ b/data/web/json_api.php
@@ -1550,7 +1550,6 @@ if (isset($_GET['query'])) {
"ipv4" => $ipv4,
"ipv6" => $ipv6
);
- curl_close($curl);
echo json_encode($ips);
}
break;
diff --git a/docker-compose.yml b/docker-compose.yml
index 5b8992769..1764df8e8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -120,7 +120,7 @@ services:
- rspamd
php-fpm-mailcow:
- image: ghcr.io/mailcow/phpfpm:8.2.36-1
+ image: ghcr.io/mailcow/phpfpm:8.5.13-1
command: "php-fpm -d date.timezone=${TZ} -d expose_php=0"
depends_on:
- redis-mailcow
diff --git a/helper-scripts/dev_tests/run_php_unit_tests.sh b/helper-scripts/dev_tests/run_php_unit_tests.sh
index 91f4e5022..571b45022 100755
--- a/helper-scripts/dev_tests/run_php_unit_tests.sh
+++ b/helper-scripts/dev_tests/run_php_unit_tests.sh
@@ -9,7 +9,7 @@ REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
TESTS_DIR="${REPO_DIR}/tests/php"
docker run --rm -u "$(id -u):$(id -g)" -v "${TESTS_DIR}:/app" -w /app composer:2 \
- install --no-interaction --no-progress --quiet
+ install --no-interaction --no-progress --quiet --ignore-platform-req=ext-*
-docker run --rm -u "$(id -u):$(id -g)" -v "${REPO_DIR}:/app" -w /app/tests/php php:8.2-cli \
+docker run --rm -u "$(id -u):$(id -g)" -v "${REPO_DIR}:/app" -w /app/tests/php php:8.5-cli \
php vendor/bin/phpunit "$@"
diff --git a/tests/php/Auth/AppPasswordLoginTest.php b/tests/php/Auth/AppPasswordLoginTest.php
index 3195ec241..093bb1019 100644
--- a/tests/php/Auth/AppPasswordLoginTest.php
+++ b/tests/php/Auth/AppPasswordLoginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace Mailcow\Tests\Auth;
use PDO;
+use Pdo\Sqlite;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
@@ -16,13 +17,13 @@ class AppPasswordLoginTest extends TestCase
{
private const PROTOCOLS = ['imap_access', 'smtp_access', 'pop3_access', 'sieve_access', 'eas_access', 'dav_access'];
- private PDO $pdo;
+ private Sqlite $pdo;
protected function setUp(): void
{
- $this->pdo = new PDO('sqlite::memory:');
+ $this->pdo = new Sqlite('sqlite::memory:');
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- $this->pdo->sqliteCreateFunction('regexp', fn ($pattern, $value) => preg_match('/' . $pattern . '/', (string)$value) === 1, 2);
+ $this->pdo->createFunction('regexp', fn ($pattern, $value) => preg_match('/' . $pattern . '/', (string)$value) === 1, 2);
$this->pdo->exec("CREATE TABLE `domain` (`domain` TEXT PRIMARY KEY, `active` INTEGER NOT NULL DEFAULT 1)");
$this->pdo->exec("CREATE TABLE `mailbox` (`username` TEXT PRIMARY KEY, `domain` TEXT, `kind` TEXT NOT NULL DEFAULT '',
`active` INTEGER NOT NULL DEFAULT 1, `attributes` TEXT)");
diff --git a/tests/php/composer.json b/tests/php/composer.json
index 5b8607385..7a6104001 100644
--- a/tests/php/composer.json
+++ b/tests/php/composer.json
@@ -14,7 +14,7 @@
},
"config": {
"platform": {
- "php": "8.2.29"
+ "php": "8.5.13"
},
"sort-packages": true
}
diff --git a/tests/php/composer.lock b/tests/php/composer.lock
index 91b993d2c..2261aac35 100644
--- a/tests/php/composer.lock
+++ b/tests/php/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "4211ddb7f0a4ed07b766e52d30177798",
+ "content-hash": "9764455703f9794907471be583c8c15b",
"packages": [],
"packages-dev": [
{
@@ -2013,7 +2013,7 @@
"platform": {},
"platform-dev": {},
"platform-overrides": {
- "php": "8.2.29"
+ "php": "8.5.13"
},
"plugin-api-version": "2.11.0"
}