Commit ab5aab561237f3e411ce24158a409bb8ee5b0e2a
1 parent
ebe18d0a
Exists in
master
and in
108 other branches
delete not needed copy
Showing
1 changed file
with
5 additions
and
8 deletions
Show diff stats
php/classes/UserMgr.php
... | ... | @@ -544,26 +544,23 @@ class UserMgr |
544 | 544 | } |
545 | 545 | |
546 | 546 | if (file_exists($this->userdir.'newLogin')) { |
547 | - copy($this->userdir.'newLogin',$this->userdir.'lastLogin'); | |
548 | - $dt = filemtime($this->userdir.'newLogin'); | |
549 | - touch($this->userdir.'lastLogin', $dt); | |
547 | + touch($this->userdir.'lastLogin', filemtime($this->userdir.'newLogin')); | |
550 | 548 | } |
551 | - else | |
549 | + else { | |
552 | 550 | touch($this->userdir.'lastLogin', time() - 5*86400); // last 5 days |
551 | + } | |
553 | 552 | |
554 | 553 | // if new info exists it will be shown to : |
555 | 554 | // public => to all |
556 | 555 | // special => to group members |
557 | 556 | if (file_exists($this->userdir.'newInfo')) |
558 | - { | |
557 | + { | |
559 | 558 | $amdaInfo = new AmdaNews($this->user); |
560 | - // if status = 0 - it is special info to group members only | |
561 | - // else to all | |
562 | 559 | $info = $this->getUserInfo($this->user); |
563 | 560 | $status = $amdaInfo->makeInfo($info['group']); |
564 | 561 | |
565 | 562 | if ($status) $this->isNewInfo = true; |
566 | - | |
563 | + | |
567 | 564 | unlink($this->userdir.'newInfo'); |
568 | 565 | } |
569 | 566 | touch($this->userdir.'newLogin'); |
... | ... |