From b7332908d8ed550bf727df95a344b59ab1216e7c Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Mon, 18 Aug 2008 11:04:32 -0400 Subject: [PATCH] - Fixed several bugs in the installer. - Changed mbox regex in dns manager. --- install/lib/install.lib.php | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 5c037fb..d8eb0d6 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -438,6 +438,38 @@ return $content; } +function is_user($user){ + global $mod; + $user_datei = '/etc/passwd'; + $users = no_comments($user_datei); + $lines = explode("\n", $users); + if(is_array($lines)){ + foreach($lines as $line){ + if(trim($line) != ""){ + list($f1, $f2, $f3, $f4, $f5, $f6, $f7) = explode(":", $line); + if($f1 == $user) return true; + } + } + } + return false; +} + +function is_group($group){ + global $mod; + $group_datei = '/etc/group'; + $groups = no_comments($group_datei); + $lines = explode("\n", $groups); + if(is_array($lines)){ + foreach($lines as $line){ + if(trim($line) != ""){ + list($f1, $f2, $f3, $f4) = explode(":", $line); + if($f1 == $group) return true; + } + } + } + return false; +} + ?> \ No newline at end of file -- Gitblit v1.9.1