Mehr logging
bernd

bernd commited on 2008-06-06 06:58:55
Zeige 1 geänderte Dateien mit 8 Einfügungen und 0 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1109 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -37,8 +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 41
       return $role;
41 42
     }
43
+    logger("session/checkuser.php", "login", "wrong password for existing useraccount »{$username}«.");
44
+  } else {
45
+    logger("session/checkuser.php", "login", "did not find useraccount »{$username}«. trying other roles...");
42 46
   }
43 47
 
44 48
   // Customer?
... ...
@@ -65,8 +69,10 @@ function find_role($login, $password, $i_am_admin = False)
65 69
     $hash = crypt($password, $db_password);
66 70
     if ($hash == $db_password || $i_am_admin)
67 71
     {
72
+      logger("session/checkuser.php", "login", "logged in e-mail-account »{$account}«.");
68 73
       return ROLE_MAILACCOUNT;
69 74
     }
75
+    logger("session/checkuser.php", "login", "wrong password for existing e-mail-account »{$account}«.");
70 76
   }
71 77
   
72 78
   // virtueller Mail-Account
... ...
@@ -79,8 +85,10 @@ function find_role($login, $password, $i_am_admin = False)
79 85
     $hash = crypt($password, $db_password);
80 86
     if ($hash == $db_password || $i_am_admin)
81 87
     {
88
+      logger("session/checkuser.php", "login", "logged in virtual e-mail-account »{$account}«.");
82 89
       return ROLE_VMAIL_ACCOUNT;
83 90
     }
91
+    logger("session/checkuser.php", "login", "wrong password for existing virtual e-mail-account »{$account}«.");
84 92
   }
85 93
   
86 94
 
87 95