Skip to content

Commit

Permalink
Merge branch '2024.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Nov 21, 2024
2 parents f2bbb9c + 53983f0 commit 4bbbdec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions tine20/Tinebase/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ public static function getInstance()

return self::$_instance;
}

public static function destroyInstance(): void
{
self::$_instance = null;
}

/**
* return an instance of the current groups backend
Expand Down
4 changes: 2 additions & 2 deletions tine20/Tinebase/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public static function factory($backendType)

if ((self::ACTIVEDIRECTORY === $backendType || self::LDAP === $backendType)
&& Tinebase_Config::getInstance()->{Tinebase_Config::USERBACKEND}->{Tinebase_Config::SYNCOPTIONS}->{Tinebase_Config::SYNC_USER_OF_GROUPS}
&& ($unavailableSince = Tinebase_Config::getInstance()->USERBACKEND_UNAVAILABLE_SINCE)) {
&& ($unavailableSince = Tinebase_Config::getInstance()->{Tinebase_Config::USERBACKEND_UNAVAILABLE_SINCE})) {
if (time() - $unavailableSince < 60 * 15) {
$backendType = self::SQL;
}
Expand Down Expand Up @@ -293,7 +293,7 @@ public static function factory($backendType)
if (Tinebase_Config::getInstance()->{Tinebase_Config::USERBACKEND}->{Tinebase_Config::SYNCOPTIONS}->{Tinebase_Config::SYNC_USER_OF_GROUPS}) {
Tinebase_Config::getInstance()->clearCache();
try {
Tinebase_Config::getInstance()->USERBACKEND_UNAVAILABLE_SINCE = time();
Tinebase_Config::getInstance()->{Tinebase_Config::USERBACKEND_UNAVAILABLE_SINCE} = time();
} catch (Exception) {}
return self::factory(self::SQL);
} else {
Expand Down
2 changes: 1 addition & 1 deletion tine20/Tinebase/User/ActiveDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ protected function _user2ldap(Tinebase_Model_FullUser $_user, array $_ldapEntry
'useraccountcontrol' => isset($_ldapEntry['useraccountcontrol']) ? $_ldapEntry['useraccountcontrol'][0] : self::NORMAL_ACCOUNT
);
if (Tinebase_Config::getInstance()->{Tinebase_Config::USERBACKEND}->{Tinebase_Config::SYNCOPTIONS}->{Tinebase_Config::PWD_CANT_CHANGE}) {
$ldapData['useraccountcontrol'] &= self::PASSWD_CANT_CHANGE;
$ldapData['useraccountcontrol'] |= self::PASSWD_CANT_CHANGE;
}

if (isset($_user->xprops()['uidnumber'])) {
Expand Down
2 changes: 1 addition & 1 deletion tine20/Tinebase/User/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ public function isReadOnlyUser(string|int|null $userId): bool
if (null === $this->_writeGroupsMembers) {
$members = [];
foreach ($this->_writeGroupsIds as $gid) {
array_merge($members, Tinebase_Group::getInstance()->getGroupMembers($gid));
$members = array_merge($members, Tinebase_Group::getInstance()->getGroupMembers($gid));
}
$this->_writeGroupsMembers = array_fill_keys(array_unique($members), false);
}
Expand Down

0 comments on commit 4bbbdec

Please sign in to comment.