mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Some minor improvements
This commit is contained in:
parent
1515a89e2d
commit
f7e648da70
6 changed files with 89 additions and 31 deletions
|
@ -130,7 +130,7 @@ function chat_get_users($chatid) {
|
|||
|
||||
global $CFG;
|
||||
|
||||
return get_records_sql("SELECT u.id, u.firstname, u.lastname, u.picture
|
||||
return get_records_sql("SELECT u.id, u.firstname, u.lastname, u.picture, c.lastmessageping
|
||||
FROM {$CFG->prefix}chat_users c,
|
||||
{$CFG->prefix}user u
|
||||
WHERE c.chatid = '$chatid'
|
||||
|
@ -158,7 +158,7 @@ function chat_login_user($chatid, $version="header_js") {
|
|||
$chatuser->userid = $USER->id;
|
||||
$chatuser->version = $version;
|
||||
$chatuser->ip = $USER->lastIP;
|
||||
$chatuser->lastping = time();
|
||||
$chatuser->lastping = $chatuser->firstping = $chatuser->lastmessageping = time();
|
||||
$chatuser->sid = random_string(32);
|
||||
|
||||
if (!insert_record("chat_users", $chatuser)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue