Code

Fixed regular expression code for gecos
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Aug 2006 06:20:19 +0000 (06:20 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Aug 2006 06:20:19 +0000 (06:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4539 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc

index 96e1bd7961836129003c3358bb762db80d0e8629..74d85a2eb236e51c756f66ed690f4c2f899104aa 100644 (file)
@@ -790,7 +790,7 @@ class posixAccount extends plugin
     /* Fill gecos */
     if (isset($this->parent) && $this->parent != NULL){
       $this->gecos= rewrite($this->parent->by_object['user']->cn);
-      if (!preg_match('/[a-z0-9 -]/i', $this->gecos)){
+      if (!preg_match('/^[a-z0-9 -]+$/i', $this->gecos)){
         $this->gecos= "";
       }
     }