diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile index 9b0f497ea..394a14e10 100644 --- a/.docker/php/Dockerfile +++ b/.docker/php/Dockerfile @@ -8,14 +8,15 @@ RUN apt-get install -y \ build-essential chrpath libssl-dev \ libxft-dev libfreetype6 libfreetype6-dev \ libpng-dev libjpeg62-turbo-dev \ - libfontconfig1 libfontconfig1-dev libzip-dev + libfontconfig1 libfontconfig1-dev libzip-dev libldap2-dev RUN pecl install mcrypt-1.0.2 && \ docker-php-ext-enable mcrypt RUN docker-php-ext-configure intl && \ + docker-php-ext-configure ldap && \ docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ - docker-php-ext-install opcache pdo_mysql zip intl gd + docker-php-ext-install opcache pdo_mysql zip intl gd ldap RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer diff --git a/.gitignore b/.gitignore index f7e44b877..1cca1db71 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /data /MULTIPLY /include.php +.idea/ \ No newline at end of file diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Identities.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Identities.php index 910366f50..59be72e42 100755 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Identities.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Providers/Identities.php @@ -36,15 +36,13 @@ class Identities extends AbstractProvider // Find all identities stored in the system $identities = $this->MergeIdentitiesPerDriver($this->GetIdentiesPerDriver($account)); - file_put_contents('php://stderr', print_r($this->identitiesPerDriverPerAccount, TRUE)); - // Find the primary identity - $primaryIdentity = array_filter($identities, function($identity) { + $primaryIdentity = current(array_filter($identities, function($identity) { return $identity->IsAccountIdentities(); - })[0]; + })); // If no primary identity is found, generate default one from account info - if($primaryIdentity === null) + if($primaryIdentity === null || $primaryIdentity === false) $identities[] = $primaryIdentity = new Identity('', $account->Email()); // Return only primary identity or all identities @@ -73,9 +71,9 @@ class Identities extends AbstractProvider // If it is a new identity we add it to any storage driver if($isNew) { // Pick any storage driver to store the result, typically only file storage - $storageDriver = array_filter($this->drivers, function($driver) { + $storageDriver = current(array_filter($this->drivers, function($driver) { return $driver->SupportsStore(); - })[0]; + })); $identities[$storageDriver->Name()][$identity->Id(true)] = $identity; $storageDriver->SetIdentities($account, $identities[$storageDriver->Name()]); diff --git a/yarn.lock b/yarn.lock index 665101810..0e272a23d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3972,11 +3972,6 @@ istextorbinary@2.2.1: editions "^1.3.3" textextensions "2" -jquery@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.1.tgz#d7b4d08e1bfdb86ad2f1a3d039ea17304717abb5" - integrity sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg== - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"