implemented error log
This commit is contained in:
1 parent
d7683c676b
commit
d904a6f276
1 file changed
+24
@@ -598,6 +598,30 @@ class ActionParser {
|
||||
$GLOBALS['extraScriptParams']['page'] = "reset-password";
|
||||
}
|
||||
} else {
|
||||
try
|
||||
{
|
||||
$sql = sprintf("SELECT id FROM din_user WHERE username = %s", $conn->quoteSmart(scriptParam('username')));
|
||||
$result = $conn->query($sql);
|
||||
$userExists = $result->numRows() > 0;
|
||||
|
||||
$error = true;
|
||||
$passwordExists = scriptParam('password') != '';
|
||||
|
||||
if($userExists)
|
||||
{
|
||||
$error = "user exists, wrong password?";
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = "user not found..";
|
||||
}
|
||||
|
||||
$sql = sprintf("INSERT INTO `inside_auth_log`(`username`, `password`,`error`) VALUES(%s,%s,%s)",$conn->quoteSmart(scriptParam('username')), $passwordExists, $error);
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
|
||||
}
|
||||
notify("Problemer med innlogging.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user