[UPDATE] delete cookies on login

This commit is contained in:
iAmShorty 2014-04-02 13:47:25 +02:00
parent 477ed0884d
commit 4527d4793d
2 changed files with 5 additions and 1 deletions

View File

@ -192,6 +192,11 @@ class User extends Base {
return false;
}
if ($this->checkUserPassword($username, $password)) {
// delete notification cookies
setcookie("motd-box", "", time()-3600);
setcookie("lastlogin-box", "", time()-3600);
setcookie("backend-box", "", time()-3600);
// rest of login process
$uid = $this->getUserId($username);
$lastLoginTime = $this->getLastLogin($uid);
$this->updateLoginTimestamp($uid);

View File

@ -23,7 +23,6 @@ $(document).ready(function() {
// Bootstrap iOS style switches for checkboxes with switch class
$('.switch').bootstrapSwitch();
if (document.getElementById("motd")) {
var md5motd = $.md5(document.getElementById('motd').innerHTML);
// Check if MOTD alert has been closed