handle last_login in editor/login sequence
This commit is contained in:
parent
f16ef23677
commit
f6f321982f
11
backend.php
11
backend.php
|
@ -1829,7 +1829,7 @@
|
|||
</table>";
|
||||
|
||||
$result = db_query($link, "SELECT
|
||||
id,login,access_level
|
||||
id,login,access_level,last_login
|
||||
FROM
|
||||
ttrss_users
|
||||
ORDER by login");
|
||||
|
@ -1837,9 +1837,10 @@
|
|||
print "<p><table width=\"100%\" class=\"prefUserList\" id=\"prefUserList\">";
|
||||
|
||||
print "<tr class=\"title\">
|
||||
<td width=\"5%\">Select</td><td width='40%'>Login
|
||||
</td>
|
||||
<td width='40%'>Access Level</td></tr>";
|
||||
<td width=\"5%\">Select</td>
|
||||
<td width='30%'>Username</td>
|
||||
<td width='30%'>Access Level</td>
|
||||
<td width='30%'>Last login</td></tr>";
|
||||
|
||||
$lnum = 0;
|
||||
|
||||
|
@ -1866,7 +1867,6 @@
|
|||
print "<td>".$line["login"]."</td>";
|
||||
print "<td>".$line["access_level"]."</td>";
|
||||
|
||||
|
||||
} else if (!$edit_uid || $subop != "edit") {
|
||||
|
||||
print "<td><input onclick='toggleSelectRow(this);'
|
||||
|
@ -1898,6 +1898,7 @@
|
|||
|
||||
}
|
||||
|
||||
print "<td>".$line["last_login"]."</td>";
|
||||
|
||||
print "</tr>";
|
||||
|
||||
|
|
|
@ -528,6 +528,9 @@
|
|||
$_SESSION["name"] = db_fetch_result($result, 0, "login");
|
||||
$_SESSION["access_level"] = db_fetch_result($result, 0, "access_level");
|
||||
|
||||
db_query($link, "UPDATE ttrss_users SET last_login = NOW() WHERE id = " .
|
||||
$_SESSION["uid"]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue