From: cajus Date: Fri, 1 Aug 2008 08:25:06 +0000 (+0000) Subject: Unified group check in FAI templates X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d3581e1d11750b54af94f3b52fe5d0363116a7c4;p=gosa.git Unified group check in FAI templates git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12089 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc index 85f3ea6f8..5a4ab856b 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc @@ -215,8 +215,12 @@ class faiTemplateEntry extends plugin if(empty($this->group)){ $message[] = msgPool::required(_("Group")); } - elseif(preg_match("/[^0-9a-z]/i",$this->group)){ - $message[] = msgPool::invalid(_("Group"),$this->group,"/[0-9a-z]/"); + elseif (!tests::is_uid($this->group)){ + if (strict_uid_mode()){ + $message[]= msgPool::invalid(_("Group"), $this->group, "/[a-z0-9_-]/"); + } else { + $message[]= msgPool::invalid(_("Group"), $this->group, "/[a-z0-9_-]/i"); + } } return ($message);