From: hickert Date: Wed, 7 Dec 2005 08:06:15 +0000 (+0000) Subject: GoFonPin is now alphanumeric and must be at least one char long. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=28553d0d6ffd5a0178ef248fe26a76f1e5e7d79a;p=gosa.git GoFonPin is now alphanumeric and must be at least one char long. 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 --- diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 031dea731..939d3b2a2 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -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.")); } }