Browse Source

add password repeat custom field

andre 5 years ago
parent
commit
15c1d03b56
1 changed files with 13 additions and 1 deletions
  1. 13 1
      zimbraSingle.inc

+ 13 - 1
zimbraSingle.inc

@@ -521,6 +521,18 @@ function zimbraSingleCreateCustomFields($packageconfigoption)
                 'sortorder' => '4'
             )
     );
+    Capsule::table('tblcustomfields')
+        ->insert(
+            array(
+                'type' => 'product',
+                'relid' => $productID,
+                'fieldname' => 'pwrepeat | Password wiederholen',
+                'fieldtype' => 'password',
+                'required' => 'on',
+                'showorder' => 'on',
+                'sortorder' => '5'
+            )
+    );
     Capsule::table('tblcustomfields')
         ->insert(
             array(
@@ -555,7 +567,7 @@ function recursiveFindAll($haystack, $needle)
 function zimbraSingleCheckPassword($pwd)
 {
     $message = '';
-    if (strlen($pwd) < 9) {
+    if (strlen($pwd) < 8) {
         $message .= "Das das Passwort ist zu kurz. Es werden mind. 9 Zeichen benötigt" . PHP_EOL;
     }
     if (!preg_match("#[0-9]+#", $pwd)) {