diff --git a/mod/chat/gui_header_js/jsupdate.php b/mod/chat/gui_header_js/jsupdate.php index d288f0ed0dd..7adef147c8e 100644 --- a/mod/chat/gui_header_js/jsupdate.php +++ b/mod/chat/gui_header_js/jsupdate.php @@ -122,8 +122,8 @@ set_field('chat_users', 'lastping', $chatuser->lastping, 'id', $chatuser->id ); if ($refreshusers) { - echo "if (parent.users.document.anchors[0] != null) {" . - "parent.users.location.href = parent.users.document.anchors[0].href;}\n"; + echo "if (parent.users.document.anchors[1] != null) {" . + "parent.users.location.href = parent.users.document.anchors[1].href;}\n"; } else { foreach($us as $uid=>$lastping) { $min = (int) ($lastping/60);