[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 05/07: Doc and audit
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 05/07: Doc and audit |
Date: |
Thu, 23 Sep 2021 04:04:58 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit c07d16f54d6479b657b2111545bd0a346cf468c3
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Sep 16 09:48:53 2021 +0200
Doc and audit
---
include/class/user.class.php | 10 ++++++++--
include/config.inc.example | 3 +++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/class/user.class.php b/include/class/user.class.php
index 45faa80..9dbf40d 100644
--- a/include/class/user.class.php
+++ b/include/class/user.class.php
@@ -108,7 +108,11 @@ class User
if ($this->load()==-1)
{
echo '<h2 class="error">'._('Utilisateur ou mot de passe
incorrect').'</h2>';
-
+ $sql="insert into audit_connect
(ac_user,ac_ip,ac_module,ac_url,ac_state) values ($1,$2,$3,$4,$5)";
+ $this->db->exec_sql($sql,
+ array($_SESSION[SESSION_KEY.'g_user'],
$_SERVER["REMOTE_ADDR"], "DISCON",
+ $_SERVER['REQUEST_URI'], 'FAIL'));
+ $this->clean_session();
redirect('logout.php', 1);
exit();
}
@@ -440,10 +444,12 @@ class User
}
else
{
- if ($from=='LOGIN')
+ if ($from=='LOGIN' || $from=='PORTAL')
+ {
$cn->exec_sql($sql,
array($_SESSION[SESSION_KEY.'g_user'],
$_SERVER["REMOTE_ADDR"], $from,
$_SERVER['REQUEST_URI'], 'SUCCESS'));
+ }
$this->valid=1;
}
diff --git a/include/config.inc.example b/include/config.inc.example
index 28eebcc..ea16393 100644
--- a/include/config.inc.example
+++ b/include/config.inc.example
@@ -83,3 +83,6 @@ define ("DEBUGNOALYSS",0);
// define ("MAX_FILE_SIZE",2097152);
// Create your own SESSION_KEY
// define ("SESSION_KEY","irazap492pq11");
+//
+// Audit everything
+// define ("AUDIT_ENABLE",true);
- [Noalyss-commit] [noalyss] branch master updated (9a23cc5 -> ed31dd8), Dany De Bontridder, 2021/09/23
- [Noalyss-commit] [noalyss] 04/07: Cosmetic small devices, Dany De Bontridder, 2021/09/23
- [Noalyss-commit] [noalyss] 06/07: Bug : cannot print great leadger, due an "ambiguous column", incompatible with psql 12, Dany De Bontridder, 2021/09/23
- [Noalyss-commit] [noalyss] 03/07: Doc., Dany De Bontridder, 2021/09/23
- [Noalyss-commit] [noalyss] 02/07: Bug : lettering for card, false warning if paid in several times caused by PostgreSQL 12, Dany De Bontridder, 2021/09/23
- [Noalyss-commit] [noalyss] 05/07: Doc and audit,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 01/07: Bug #2065 : non - assujetti , vente ne fonctionnent pas, problème devise, Dany De Bontridder, 2021/09/23
- [Noalyss-commit] [noalyss] 07/07: Bug : cannot create separate PDF, Dany De Bontridder, 2021/09/23