git subrepo commit mailcow/src/mailcow-dockerized

subrepo: subdir:   "mailcow/src/mailcow-dockerized"
  merged:   "308860af"
upstream: origin:   "https://github.com/mailcow/mailcow-dockerized.git"
  branch:   "master"
  commit:   "3f1a5af8"
git-subrepo: version:  "0.4.5"
  origin:   "???"
  commit:   "???"
Change-Id: I5d51c14b45db54fe706be40a591ddbfcea50d4b0
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasAttributes.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasAttributes.php
index 20fcec0..b5f33357 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasAttributes.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Models/Concerns/HasAttributes.php
@@ -238,26 +238,28 @@
      * Returns the models attribute by its key.
      *
      * @param int|string $key
+     * @param mixed      $default
      *
      * @return mixed
      */
-    public function getAttribute($key)
+    public function getAttribute($key, $default = null)
     {
         if (! $key) {
             return;
         }
 
-        return $this->getAttributeValue($key);
+        return $this->getAttributeValue($key, $default);
     }
 
     /**
      * Get an attributes value.
      *
      * @param string $key
+     * @param mixed  $default
      *
      * @return mixed
      */
-    public function getAttributeValue($key)
+    public function getAttributeValue($key, $default = null)
     {
         $key = $this->normalizeAttributeKey($key);
         $value = $this->getAttributeFromArray($key);
@@ -274,7 +276,7 @@
             return $this->castAttribute($key, $value);
         }
 
-        return $value;
+        return is_null($value) ? $default : $value;
     }
 
     /**
@@ -311,9 +313,9 @@
      * @param string $type
      * @param mixed  $value
      *
-     * @throws LdapRecordException
-     *
      * @return float|string
+     *
+     * @throws LdapRecordException
      */
     public function fromDateTime($type, $value)
     {
@@ -326,9 +328,9 @@
      * @param mixed  $value
      * @param string $type
      *
-     * @throws LdapRecordException
-     *
      * @return Carbon|false
+     *
+     * @throws LdapRecordException
      */
     public function asDateTime($value, $type)
     {
@@ -686,13 +688,14 @@
      * Returns the first attribute by the specified key.
      *
      * @param string $key
+     * @param mixed  $default
      *
      * @return mixed
      */
-    public function getFirstAttribute($key)
+    public function getFirstAttribute($key, $default = null)
     {
         return Arr::first(
-            Arr::wrap($this->getAttribute($key))
+            Arr::wrap($this->getAttribute($key, $default)),
         );
     }
 
@@ -707,10 +710,10 @@
     }
 
     /**
-     * Set an attribute value by the specified key and sub-key.
+     * Set an attribute value by the specified key.
      *
-     * @param mixed $key
-     * @param mixed $value
+     * @param string $key
+     * @param mixed  $value
      *
      * @return $this
      */
@@ -738,6 +741,23 @@
     }
 
     /**
+     * Set an attribute on the model. No checking is done.
+     *
+     * @param string $key
+     * @param mixed  $value
+     *
+     * @return $this
+     */
+    public function setRawAttribute($key, $value)
+    {
+        $key = $this->normalizeAttributeKey($key);
+
+        $this->attributes[$key] = Arr::wrap($value);
+
+        return $this;
+    }
+
+    /**
      * Set the models first attribute value.
      *
      * @param string $key