From ab5aab561237f3e411ce24158a409bb8ee5b0e2a Mon Sep 17 00:00:00 2001
From: Elena.Budnik <ebudnik@irap.omp.eu>
Date: Mon, 22 Oct 2018 15:01:17 +0200
Subject: [PATCH] delete not needed copy

---
 php/classes/UserMgr.php | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/php/classes/UserMgr.php b/php/classes/UserMgr.php
index 90b0df2..8dd30e9 100644
--- a/php/classes/UserMgr.php
+++ b/php/classes/UserMgr.php
@@ -544,26 +544,23 @@ class UserMgr
 		}
 
 		if (file_exists($this->userdir.'newLogin')) {
-			copy($this->userdir.'newLogin',$this->userdir.'lastLogin');
-			$dt = filemtime($this->userdir.'newLogin');
-			touch($this->userdir.'lastLogin', $dt);
+			touch($this->userdir.'lastLogin', filemtime($this->userdir.'newLogin'));
 		}
-		else 
+		else {
 			touch($this->userdir.'lastLogin', time() - 5*86400); // last 5 days
+		}
 		
 		// if new info exists it will be shown to : 
 		// public => to all
 		// special => to group members
 		if (file_exists($this->userdir.'newInfo')) 
-		{                
+		{      
 			$amdaInfo = new AmdaNews($this->user);
-			// if status = 0 - it is special info to group members only
-			// else to all  
 			$info = $this->getUserInfo($this->user);
 			$status = $amdaInfo->makeInfo($info['group']); 
 
 			if ($status) $this->isNewInfo = true; 
-					
+			
 			unlink($this->userdir.'newInfo');
 		}
 		touch($this->userdir.'newLogin');          
--
libgit2 0.21.2