summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2018-10-26 21:27:06 -0400
committerMalf Furious <m@lfurio.us>2018-10-26 21:27:06 -0400
commitf041e8a5fed0a1bc9be9aa9665f58e6f5a55879b (patch)
tree1b8b29722330d82884c053452c41b8d420ee5d56
parentbcc3ef4a22a17cf888e71078f2881715c466b6dc (diff)
downloadscrott-f041e8a5fed0a1bc9be9aa9665f58e6f5a55879b.tar.gz
scrott-f041e8a5fed0a1bc9be9aa9665f58e6f5a55879b.zip
user: Add log events for some basic user mgmt
Signed-off-by: Malf Furious <m@lfurio.us>
-rw-r--r--app/model/login.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/model/login.php b/app/model/login.php
index 6358e12..3393281 100644
--- a/app/model/login.php
+++ b/app/model/login.php
@@ -32,6 +32,10 @@ if (isAction("login"))
$user->validatePasswd($form->passwd)))
{
logError(ERROR, "Username or password is incorrect");
+
+ if ($user)
+ $log = mesg::initNewAdminLog("Failed login for username '%s'", $user);
+
goto prep;
}
@@ -72,6 +76,7 @@ if (isAction("signup"))
}
user::setCurrent($user);
+ $log = mesg::initNewAdminLog("%s account registered", $user);
location("/");
}