Code

GoFonPin is now alphanumeric and must be at least one char long.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Dec 2005 08:06:15 +0000 (08:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Dec 2005 08:06:15 +0000 (08:06 +0000)
This Pin is only used to authenticate on the asterisk server.
No typing from phone panel is required here.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2243 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/phoneaccount/class_phoneAccount.inc

index 031dea731972a59c43119d9fc67dd42f7ddc69e8..939d3b2a23fff831242c82acb3bab4ba4e1f5ec9 100644 (file)
@@ -890,11 +890,11 @@ class phoneAccount extends plugin
       }
     }
 
-    if((strlen($this->goFonPIN)!=4)){
-      $message[]=(_("Phone PIN must be 4 characters long."));
+    if((strlen($this->goFonPIN)<=0)){
+      $message[]=(_("Phone PIN must be at least one character long."));
     }else{
-      if(preg_match("/[^0-9]/",$this->goFonPIN)){
-        $message[]=(_("The specified phone PIN contains invalid characters, only numeric values are allowed here."));
+      if(preg_match("/[^0-9a-z]/i",$this->goFonPIN)){
+        $message[]=(_("The specified phone PIN contains invalid characters, only aphanumeric values are allowed here."));
       }
     }