Skip to content
Merged
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
5 changes: 3 additions & 2 deletions lib/User/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,17 @@ public function resolveUID(UserEntry $userEntry) {
/**
* TODO sync in core
* @param UserEntry $userEntry
* @param string $password
* @return bool
*/
public function updateAccount (UserEntry $userEntry) {
public function updateAccount (UserEntry $userEntry, $password) {
$targetUser = $this->userManager->get($userEntry->getOwnCloudUID());
if (!$targetUser) {
$this->logger->debug('Trying to update non existing user ' . $userEntry->getOwnCloudUID() . ', creating new account.', ['app' => self::class]);
// FIXME we don't hold a reference so we need to pull out the proxy back from the registered user backends...
foreach ($this->userManager->getBackends() as $backend) {
if ($backend instanceof User_Proxy) {
$this->userManager->createUserFromBackend($userEntry->getOwnCloudUID(), null, $backend);
$this->userManager->createUserFromBackend($userEntry->getOwnCloudUID(), $password, $backend);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/User_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function checkPassword($uid, $password) {
return false;
}

$this->userManager->updateAccount($userEntry);
$this->userManager->updateAccount($userEntry, $password);

//FIXME how can we trigger this for saml? needs to move to core!
if ($this->config->getSystemValue('enable_avatars', true) === true) {
Expand Down