git subrepo commit (merge) mailcow/src/mailcow-dockerized

subrepo: subdir:   "mailcow/src/mailcow-dockerized"
  merged:   "02ae5285"
upstream: origin:   "https://github.com/mailcow/mailcow-dockerized.git"
  branch:   "master"
  commit:   "649a5c01"
git-subrepo: version:  "0.4.3"
  origin:   "???"
  commit:   "???"
Change-Id: I870ad468fba026cc5abf3c5699ed1e12ff28b32b
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Exceptions/ConstraintViolationException.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Exceptions/ConstraintViolationException.php
new file mode 100644
index 0000000..641843a
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Exceptions/ConstraintViolationException.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace LdapRecord\Exceptions;
+
+use LdapRecord\DetectsErrors;
+use LdapRecord\LdapRecordException;
+
+class ConstraintViolationException extends LdapRecordException
+{
+    use DetectsErrors;
+
+    /**
+     * Determine if the exception was generated due to the password policy.
+     *
+     * @return bool
+     */
+    public function causedByPasswordPolicy()
+    {
+        return isset($this->detailedError)
+                ? $this->errorContainsMessage($this->detailedError->getDiagnosticMessage(), '0000052D')
+                : false;
+    }
+
+    /**
+     * Determine if the exception was generated due to an incorrect password.
+     *
+     * @return bool
+     */
+    public function causedByIncorrectPassword()
+    {
+        return isset($this->detailedError)
+                ? $this->errorContainsMessage($this->detailedError->getDiagnosticMessage(), '00000056')
+                : false;
+    }
+}