From bcdcbcccc0ace34d2978c88de6a2044072339f53 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 16 Dec 2004 02:13:19 +0000 Subject: [PATCH] Merged logging from stable --- login/index.php | 5 +++-- login/logout.php | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/login/index.php b/login/index.php index aa6352a1e7..b914b97e2b 100644 --- a/login/index.php +++ b/login/index.php @@ -111,6 +111,7 @@ } + add_to_log(SITEID, "user", "login", "view.php?id=$user->id&course=".SITEID, $user->id, 0, $user->id); if (user_not_fully_set_up($USER)) { $urltogo = $CFG->wwwroot.'/user/edit.php?id='.$USER->id.'&course='.SITEID; @@ -141,10 +142,10 @@ } } - redirect($urltogo); - reset_login_count(); + redirect($urltogo); + die; } else { diff --git a/login/logout.php b/login/logout.php index 256840ff24..32aedb2643 100644 --- a/login/logout.php +++ b/login/logout.php @@ -3,6 +3,10 @@ require_once("../config.php"); + if (isset($USER) and isset($USER->id)) { + add_to_log(SITEID, "user", "logout", "view.php?id=$USER->id&course=".SITEID, $USER->id, 0, $USER->id); + } + if (ini_get_bool("register_globals") and check_php_version("4.3.0")) { // This method is just to try to avoid silly warnings from PHP 4.3.0 session_unregister("USER"); -- 2.39.5