mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:27:03 +02:00
use email instead of username in the online table
This commit is contained in:
@ -80,10 +80,10 @@ if(Registry::get('username')) {
|
||||
}
|
||||
|
||||
if(ENABLE_SAAS == 1) {
|
||||
$query = $db->query("UPDATE " . TABLE_ONLINE . " SET last_activity=? WHERE username=? AND ipaddr=?", array(NOW, Registry::get('username'), $_SERVER['REMOTE_ADDR']));
|
||||
$query = $db->query("UPDATE " . TABLE_ONLINE . " SET last_activity=? WHERE username=? AND ipaddr=?", array(NOW, $session->get('email'), $_SERVER['REMOTE_ADDR']));
|
||||
|
||||
if($db->countAffected() == 0) {
|
||||
$query = $db->query("INSERT INTO " . TABLE_ONLINE . " (username, ts, last_activity, ipaddr) VALUES(?,?,?,?)", array(Registry::get('username'), NOW, NOW, $_SERVER['REMOTE_ADDR']));
|
||||
$query = $db->query("INSERT INTO " . TABLE_ONLINE . " (username, ts, last_activity, ipaddr) VALUES(?,?,?,?)", array($session->get('email'), NOW, NOW, $_SERVER['REMOTE_ADDR']));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user