Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Logins and logouts are now logged

  • Loading branch information...
commit 0b8d3275d8b62a62438d3e059e2d0e8682b84279 1 parent 440d3cd
moodler authored
Showing with 8 additions and 2 deletions.
  1. +4 −2 login/index.php
  2. +4 −0 login/logout.php
View
6 login/index.php
@@ -74,6 +74,10 @@
unset($SESSION->lang);
$SESSION->justloggedin = true;
+ add_to_log(SITEID, "user", "login", "view.php?id=$user->id&course=".SITEID, $user->id, 0, $user->id);
+
+ reset_login_count();
+
if (user_not_fully_set_up($USER)) {
$site = get_site();
redirect("$CFG->wwwroot/user/edit.php?id=$USER->id&course=$site->id");
@@ -84,8 +88,6 @@
} else {
redirect("$CFG->wwwroot/"); /// Go to the standard home page
}
-
- reset_login_count();
die;
View
4 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");
Please sign in to comment.
Something went wrong with that request. Please try again.