Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions backend/userbackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public function __construct(TokenService $tokenService, $config, $backend=null)

$this->autoCreateUser = false;
$autoCreateUser = $config->getValue('user_servervars2', 'auto_create_user','false');
error_log('servervars2 - backend/userbackend.php autoCreateUser ' . $autoCreateUser);
if ($autoCreateUser !== 'false') {
$this->autoCreateUser = true;
}
Expand Down
19 changes: 10 additions & 9 deletions service/proxyuserandgroupservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function createUser($uid) {


public function provisionUser($uid, $tokens) {
error_log('servervars2 - service/proxyuserandgroupservice.php provisionUser uid ' . $uid);
if ( $this->isAutoCreateUser() ) {
$justCreatedUser = $this->createUser($uid);
}
Expand Down Expand Up @@ -129,23 +130,23 @@ public function updateGroup($user, $groupsArray) {
$uid = $user->getUID();

if (empty($groupsArray) && !empty($defaultGroups)) {
$groupsArray = $defaultGroups;
}
$groupsArray = $defaultGroups;
}

$naming = $this->groupNamingService;
$naming = $this->groupNamingService;

$groupNames = $this->getGroupNames($groupsArray, $naming);
$groupNames = $this->getGroupNames($groupsArray, $naming);


$rawOldGroupIds = $this->groupManager->getUserGroupIds( $user );
$oldGroupNames = $this->getOldGroupNames($rawOldGroupIds, $naming);
$oldGroupNames = $this->getOldGroupNames($rawOldGroupIds, $naming);


$toAddGrps = $this->getGroupNamesToAdd($groupNames, $oldGroupNames);
$toRemGrps = $this->getGroupNamesToRemove($groupNames, $oldGroupNames);
$toAddGrps = $this->getGroupNamesToAdd($groupNames, $oldGroupNames);
$toRemGrps = $this->getGroupNamesToRemove($groupNames, $oldGroupNames);

$this->addToGroup($user, $toAddGrps);
$this->removeFromGroup($user, $toRemGrps);
$this->addToGroup($user, $toAddGrps);
$this->removeFromGroup($user, $toRemGrps);

}

Expand Down