|
|
@@ -296,7 +296,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
break;
|
|
|
case 'password':
|
|
|
if (!empty($val) && !$this->changePassword($userName, $val)) {
|
|
|
- $this->setError(1, "Nie udało się zmienić hasła dla usera '{$userName}'", '(' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . ')');
|
|
|
+ $this->setError(1, "Nie udało się zmienić hasła dla usera '{$userName}'", '(' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . ')');
|
|
|
}
|
|
|
break;
|
|
|
case 'homeEmail':
|
|
|
@@ -317,7 +317,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
}
|
|
|
|
|
|
if ($this->hasErrors()) {
|
|
|
- $this->setError(1, "Nie udało się zaktualizować danych usera '{$userName}'", '(' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . ')');
|
|
|
+ $this->setError(1, "Nie udało się zaktualizować danych usera '{$userName}'", '(' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . ')');
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
@@ -561,7 +561,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
public function createGroup(ObjectGroup $group) {
|
|
|
// TEST: $ dscl /LDAPv3/127.0.0.1 -list /Groups PrimaryGroupID
|
|
|
if ($group->zasobID <= 0) {
|
|
|
- throw new Exception("Nie udało się utworzyć grupy sieciowej '{$group->primaryKey}' '{$group->realName}' - brak numery zasobu");
|
|
|
+ throw new Exception("Nie udało się utworzyć grupy sieciowej '{$group->primaryKey}' '{$group->realName}' - brak numery zasobu");
|
|
|
}
|
|
|
$groupName = $this->_generateGroupName($group->zasobID, $group->realName);
|
|
|
$groupUidGenerated = $this->_generateGroupUid($group->zasobID, $group->realName);
|
|
|
@@ -584,7 +584,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
exec($cmd, $cmdOut, $cmdRet);
|
|
|
DBG::_('DBG_SU', '>1', "create group cmd(" . str_replace($this->_rootPass, '***', $cmd) . ") ret({$cmdRet})", $cmdOut, __CLASS__, __FUNCTION__, __LINE__);
|
|
|
if ($cmdRet !== 0) {
|
|
|
- throw new Exception("Nie udało się utworzyć grupy sieciowej '{$group->primaryKey}' '{$group->realName}'");
|
|
|
+ throw new Exception("Nie udało się utworzyć grupy sieciowej '{$group->primaryKey}' '{$group->realName}'");
|
|
|
}
|
|
|
//$command8 = "dscl -u {$user} -P {$pass} /LDAPv3/127.0.0.1 -append /Groups/{$groupUid} GroupMembership {$ACCOUNT} ";
|
|
|
//$command8 = "dscl -u {$user} -P {$pass} /LDAPv3/127.0.0.1 -delete /Groups/{$groupUid} GroupMembership {$ACCOUNT} ";
|
|
|
@@ -638,7 +638,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
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}'");
|
|
|
+ throw new Exception("Nie udało się dodać usera '{$usrLogin}' do grupy lokalnej '{$groupUid}'");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -664,7 +664,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ę usunąć 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
|
|
|
}
|
|
|
}
|
|
|
@@ -742,7 +742,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
$cmdOut = null; $cmdRet = null;
|
|
|
exec($cmd, $cmdOut, $cmdRet);
|
|
|
if ($cmdRet != 0) {// TODO: may return 62 - user already in this group
|
|
|
- throw new Exception("Nie udało się dodać usera '{$usrLogin}' do grupy sieciowej '{$groupUid}'");
|
|
|
+ throw new Exception("Nie udało się dodać usera '{$usrLogin}' do grupy sieciowej '{$groupUid}'");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -762,7 +762,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ę usunąć usera '{$usrLogin}' z grupy sieciowej '{$groupUid}'");
|
|
|
+ throw new Exception("Nie udało się usunąć usera '{$usrLogin}' z grupy sieciowej '{$groupUid}'");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -775,7 +775,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ę usunąć uid '{$usrAppleUid}' z grupy sieciowej '{$groupUid}'");
|
|
|
+ throw new Exception("Nie udało się usunąć uid '{$usrAppleUid}' z grupy sieciowej '{$groupUid}'");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -842,7 +842,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
exec($cmd, $cmdOut, $cmdRet);
|
|
|
if ($cmdRet != 0) {
|
|
|
DBG::_('DBG_SU', '>1', "cmd(" . str_replace($this->_rootPass, '***', $cmd) . ") ret({$cmdRet})", $cmdOut, __CLASS__, __FUNCTION__, __LINE__);
|
|
|
- $this->setError(1, "Nie udało się dodać grupy nadrzędnej '{$groupToAdd}' do grupy '{$groupName}' ", '(' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . ')');
|
|
|
+ $this->setError(1, "Nie udało się dodać grupy nadrzędnej '{$groupToAdd}' do grupy '{$groupName}' ", '(' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . ')');
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
@@ -867,7 +867,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
exec($cmd, $cmdOut, $cmdRet);
|
|
|
if ($cmdRet != 0) {
|
|
|
DBG::_('DBG_SU', '>1', "cmd(" . str_replace($this->_rootPass, '***', $cmd) . ") ret({$cmdRet})", $cmdOut, __CLASS__, __FUNCTION__, __LINE__);
|
|
|
- $this->setError(1, "Nie udało się usunąć grupy podrzędnej '{$groupToRemove}' z grupy '{$groupName}' ", '(' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . ')');
|
|
|
+ $this->setError(1, "Nie udało się usunąć grupy podrzędnej '{$groupToRemove}' z grupy '{$groupName}' ", '(' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . ')');
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
@@ -893,7 +893,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
$cmd = "{$cmdDsclAuth} -append /Users/{$usrLogin} EMailAddress {$aliasListFlat} ";
|
|
|
$cmdOut = null; $cmdRet = null;
|
|
|
exec($cmd, $cmdOut, $cmdRet);
|
|
|
- if ($cmdRet != 0) throw new Exception("Nie udało się dodać aliasów: {$aliasListFlat}!");
|
|
|
+ if ($cmdRet != 0) throw new Exception("Nie udało się dodać aliasów: {$aliasListFlat}!");
|
|
|
}
|
|
|
|
|
|
public function _removeMailAliases($usrLogin, $aliasList) {
|
|
|
@@ -905,7 +905,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
$cmd = "{$cmdDsclAuth} -delete /Users/{$usrLogin} EMailAddress {$aliasListFlat} ";
|
|
|
$cmdOut = null; $cmdRet = null;
|
|
|
exec($cmd, $cmdOut, $cmdRet);
|
|
|
- if ($cmdRet != 0) throw new Exception("Nie udało się usunąć aliasów: {$aliasListFlat}");
|
|
|
+ if ($cmdRet != 0) throw new Exception("Nie udało się usunąć aliasów: {$aliasListFlat}");
|
|
|
}
|
|
|
|
|
|
public function forceReplaceAliasList($usrLogin, $aliasList) {
|
|
|
@@ -916,14 +916,14 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
$cmd = "{$cmdDsclAuth} -delete /Users/{$usrLogin} EMailAddress";
|
|
|
$cmdOut = null; $cmdRet = null;
|
|
|
exec($cmd, $cmdOut, $cmdRet);
|
|
|
- if ($cmdRet != 0) throw new Exception("Nie udało się usunąć wszystkich aliasów");
|
|
|
+ if ($cmdRet != 0) throw new Exception("Nie udało się usunąć wszystkich aliasów");
|
|
|
|
|
|
if (!empty($aliasList)) {
|
|
|
sleep(1);
|
|
|
$cmd = "{$cmdDsclAuth} -append /Users/{$usrLogin} EMailAddress {$aliasListFlat}";
|
|
|
$cmdOut = null; $cmdRet = null;
|
|
|
exec($cmd, $cmdOut, $cmdRet);
|
|
|
- if ($cmdRet != 0) throw new Exception("Nie udało się dodać aliasów: {$aliasListFlat}");
|
|
|
+ if ($cmdRet != 0) throw new Exception("Nie udało się dodać aliasów: {$aliasListFlat}");
|
|
|
}
|
|
|
}
|
|
|
|