Sfoglia il codice sorgente

removed exception when cannot remove user from local group

Piotr Labudda 10 anni fa
parent
commit
1d6a7f230b
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      SE/se-lib/UserStorageMacOSX.php

+ 4 - 2
SE/se-lib/UserStorageMacOSX.php

@@ -618,6 +618,7 @@ class UserStorageMacOSX extends UserStorageBase {
 		$cmdOut = null; $cmdRet = null;
 		exec($cmd, $cmdOut, $cmdRet);
 		if ($cmdRet != 0) {
+			// group may not exists - fixed in instalator for 'El Capitan'
 			throw new Exception("Nie udało się dodać usera '{$usrLogin}' do grupy lokalnej '{$groupUid}'");
 		}
 	}
@@ -644,7 +645,8 @@ class UserStorageMacOSX extends UserStorageBase {
 		exec($cmd, $cmdOut, $cmdRet);
 		DBG::_('DBG_SU', '>1', "cmd({$cmd}) ret({$cmdRet})", $cmdOut, __CLASS__, __FUNCTION__, __LINE__);
 		if ($cmdRet != 0) {
-			throw new Exception("Nie udało się dodać usera '{$usrLogin}' z grupy lokalnej '{$groupUid}'");
+			//throw new Exception("Nie udało się usunąć usera '{$usrLogin}' z grupy lokalnej '{$groupUid}'");
+			// TODO: user may not be in this local group
 		}
 	}
 
@@ -739,7 +741,7 @@ class UserStorageMacOSX extends UserStorageBase {
 		exec($cmd, $cmdOut, $cmdRet);
 		DBG::_('DBG_SU', '>1', "cmd({$cmd}) ret({$cmdRet})", $cmdOut, __CLASS__, __FUNCTION__, __LINE__);
 		if ($cmdRet != 0) {
-			throw new Exception("Nie udało się dodać usera '{$usrLogin}' z grupy sieciowej '{$groupUid}'");
+			throw new Exception("Nie udało się usunąć usera '{$usrLogin}' z grupy sieciowej '{$groupUid}'");
 		}
 	}