diff --git a/README.md b/README.md
index c80a28e..13d457a 100644
--- a/README.md
+++ b/README.md
@@ -65,9 +65,19 @@ SQLConnectInfo database@localhost username password
SQLUserInfo users userid passwd uid gid homedir shell
SQLGroupInfo groups groupname gid members
SQLUserWhereClause "disabled != 1"
+
+ # Register login counter and date
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "login_count=login_count+1, last_login=now() WHERE userid='%u'" users
+ # Register login history
+SQLLog PASS log_sess
+SQLNamedQuery log_sess INSERT "'%u', '%a', '%V', '%{protocol}', NOW()" login_history
+
+ # Register file changes
+SQLLog STOR,DELE modified
+SQLNamedQuery modified UPDATE "modified_file=now() WHERE userid='%u'" users
+
# Used to track xfer traffic per user (without invoking a quota)
SQLLog RETR bytes-out-count
SQLNamedQuery bytes-out-count UPDATE "bytes_out_used=bytes_out_used+%b WHERE userid='%u'" users
diff --git a/add_group.php b/add_group.php
index 334916f..d161886 100644
--- a/add_group.php
+++ b/add_group.php
@@ -61,7 +61,7 @@
$errormsg = 'Group "'.$_REQUEST[$cfg['field_groupname']].'" creation failed; check log files.';
}
} else {
- $errormsg = implode($errors, "
\n");
+ $errormsg = implode("
\n", $errors);
}
}
diff --git a/add_user.php b/add_user.php
index ee890a1..8a8d754 100644
--- a/add_user.php
+++ b/add_user.php
@@ -100,7 +100,7 @@
$field_disabled => $disabled);
if ($ac->add_user($userdata)) {
if (isset($_REQUEST[$field_ad_gid])) {
- while (list($g_key, $g_gid) = each($_REQUEST[$field_ad_gid])) {
+ foreach ($_REQUEST[$field_ad_gid] as $g_key => $g_gid) {
if (!$ac->is_valid_id($g_gid)) {
$warnmsg = 'Adding additional group failed; at least one of the additional groups had an invalid GID.';
continue;
@@ -114,7 +114,7 @@
$errormsg = 'User "'.$_REQUEST[$field_userid].'" creation failed; check log files.';
}
} else {
- $errormsg = implode($errors, "
\n");
+ $errormsg = implode("
\n", $errors);
}
}
@@ -195,7 +195,7 @@
Currently there are no history login with this user.
+ +| Login Date | +Protocol | +IP | + + + +
|---|---|---|
| + | + | + |