Skip to content
Permalink
Browse files

Fix a notice when failing to log in.

  • Loading branch information...
defacer
defacer committed Mar 26, 2005
1 parent 2500b88 commit c2aa460fe6b58b8b9b3fd1caae898e2173db080a
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/datalib.php
@@ -2636,7 +2636,7 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
}
if ( isset($USER) && (empty($user) || $user==$USER->id) ) {
$db->Execute('UPDATE '. $CFG->prefix .'user SET lastIP=\''. $REMOTE_ADDR .'\', lastaccess=\''. $timenow .'\'
WHERE id = \''. $USER->id .'\' ');
WHERE id = \''. $userid .'\' ');
if ($courseid != SITEID && !empty($courseid)) { // logins etc dont't have a courseid and isteacher will break without it.
if (isstudent($courseid)) {
$db->Execute('UPDATE '. $CFG->prefix .'user_students SET timeaccess = \''. $timenow .'\' '.

0 comments on commit c2aa460

Please sign in to comment.
You can’t perform that action at this time.