diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-21 04:18:42 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-21 04:18:42 +0000 |
commit | b3c05b157969e17db53cb2afe6efe58dbc2b2ba9 (patch) | |
tree | 009883a5a12ea51362871c5f5f258364cc131f5f /modules/user/controllers | |
parent | 3ce32dab5517c0774a65da3494b1c84d930818f1 (diff) |
Move logging up to the controllers so that our logging can operate at a more meta level
Diffstat (limited to 'modules/user/controllers')
-rw-r--r-- | modules/user/controllers/login.php | 2 | ||||
-rw-r--r-- | modules/user/controllers/logout.php | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/modules/user/controllers/login.php b/modules/user/controllers/login.php index 3c1d6542..60ac16c0 100644 --- a/modules/user/controllers/login.php +++ b/modules/user/controllers/login.php @@ -30,6 +30,8 @@ class Login_Controller extends Controller { if ($user->loaded && user::is_correct_password($user, $group->password->value)) { user::login($user); + log::add("user", "User $user->name logged in", + log::INFO, html::anchor("user/$user->id", $user->name)); if ($continue = $this->input->get("continue")) { url::redirect($continue); } diff --git a/modules/user/controllers/logout.php b/modules/user/controllers/logout.php index 60f9ee50..f0feb48d 100644 --- a/modules/user/controllers/logout.php +++ b/modules/user/controllers/logout.php @@ -20,6 +20,8 @@ class Logout_Controller extends Controller { public function index() { user::logout(); + log::add("user", "User $user->name logged out", + log::INFO, html::anchor("user/$user->id", $user->name)); if ($this->input->get("continue")) { url::redirect($this->input->get("continue")); } |