// Is it not zero?
if ($GLOBALS['user_data'][getCurrentUserId()]['last_failure_raw'] != '0000-00-00 00:00:00') {
// Seperate data/time
- $array = explode(' ', $GLOBALS['user_data'][getCurrentUserId()]['last_failure']);
+ $array = explode(' ', $GLOBALS['user_data'][getCurrentUserId()]['last_failure_raw']);
// Seperate data and time again
$array['date'] = explode('-', $array[0]);
array($adminId, $userid, $taskType, $subject, smartAddSlashes($notes)), __FUNCTION__, __LINE__, true, $strip);
}
+// Updates last module / online time
+// @TODO Fix inconsistency between last_module and getWhat()
+function updateLastActivity($userid) {
+ // Run the update query
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `last_module`='%s', `last_online`=UNIX_TIMESTAMP(), `REMOTE_ADDR`='%s' WHERE `userid`=%s LIMIT 1",
+ array(
+ getWhat(),
+ detectRemoteAddr(),
+ bigintval($userid)
+ ), __FUNCTION__, __LINE__);
+}
+
// [EOF]
?>