Fehler beim Passwort-Ändern von Mailaccounts behoben.
bernd

bernd commited on 2008-06-06 07:15:13
Zeige 2 geänderte Dateien mit 5 Einfügungen und 7 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1110 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -112,13 +112,11 @@ function create_mailaccount($arr)
112 112
 function get_mailaccount_id($accountname)
113 113
 {
114 114
   list($local, $domain) = explode('@', $accountname, 2);
115
-  if ($domain == 'schokokeks.org')
116
-    $domain = '';
117 115
 
118 116
   $local = mysql_real_escape_string($local);
119
-  $domain = maybe_null($domain);
117
+  $domain = mysql_real_escape_string($domain);
120 118
 
121
-  $result = db_query("SELECT acc.id FROM mail.mailaccounts AS acc LEFT JOIN mail.v_domains AS dom ON (dom.id=acc.domain) WHERE local='{$local}' AND dom.domainname={$domain}");
119
+  $result = db_query("SELECT acc.id FROM mail.mailaccounts AS acc LEFT JOIN mail.v_domains AS dom ON (dom.id=acc.domain) WHERE local='{$local}' AND dom.domainname='{$domain}'");
122 120
   if (mysql_num_rows($result) != 1)
123 121
     system_failure('account nicht eindeutig');
124 122
   $acc = mysql_fetch_assoc($result);
... ...
@@ -37,12 +37,12 @@ function find_role($login, $password, $i_am_admin = False)
37 37
         $role = $role | ROLE_CUSTOMER;
38 38
       if ($entry->admin)
39 39
         $role = $role | ROLE_SYSADMIN;
40
-      logger("session/checkuser.php", "login", "logged in systemuser »{$username}«.");
40
+      logger("session/checkuser.php", "login", "logged in systemuser »{$login}«.");
41 41
       return $role;
42 42
     }
43
-    logger("session/checkuser.php", "login", "wrong password for existing useraccount »{$username}«.");
43
+    logger("session/checkuser.php", "login", "wrong password for existing useraccount »{$login}«.");
44 44
   } else {
45
-    logger("session/checkuser.php", "login", "did not find useraccount »{$username}«. trying other roles...");
45
+    logger("session/checkuser.php", "login", "did not find useraccount »{$login}«. trying other roles...");
46 46
   }
47 47
 
48 48
   // Customer?
49 49