IMAP/POP3 nur den usern anzeigen, die das brauchen
bernd

bernd commited on 2008-02-02 15:57:35
Zeige 2 geänderte Dateien mit 6 Einfügungen und 2 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@932 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -1,8 +1,10 @@
1 1
 <?php
2 2
 
3
+require_once('include/hasaccount.php');
4
+
3 5
 $role = $_SESSION['role'];
4 6
 
5
-if ($role & ROLE_SYSTEMUSER)
7
+if ($role & ROLE_SYSTEMUSER && (user_has_accounts() || ! user_has_vmail_domain() || user_has_regular_domain() ) )
6 8
 {
7 9
   $menu["imap_accounts"] = array("label" => "IMAP/POP3", "file" => "accounts.php", "weight" => 10);
8 10
 }
... ...
@@ -1,5 +1,7 @@
1 1
 <?php
2 2
 
3
+if (! function_exists("user_has_vmail_domain"))
4
+{
3 5
   function user_has_vmail_domain() 
4 6
   {
5 7
 	$role = $_SESSION['role'];
... ...
@@ -13,6 +15,6 @@ function user_has_vmail_domain()
13 15
 	DEBUG("User has {$count} vmail-domains");
14 16
 	return ( (int) $count > 0 );
15 17
   }  
16
-
18
+}
17 19
 
18 20
 ?>
19 21