Skip to content

Commit

Permalink
Merge pull request #798 from nextcloud/backport/797/stable-5.2
Browse files Browse the repository at this point in the history
[stable-5.2] fix: Also create skeleton for users from environment based auth
  • Loading branch information
juliusknorr authored Dec 21, 2023
2 parents 75378ad + 9e235d9 commit 2c18447
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Controller/SAMLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ public function login(int $idp = 1) {
$this->userData->setAttributes($this->session->get('user_saml.samlUserData'));
$this->autoprovisionIfPossible();
$user = $this->userResolver->findExistingUser($this->userBackend->getCurrentUserId());
$user->updateLastLoginTimestamp();
$firstLogin = $user->updateLastLoginTimestamp();
if ($firstLogin) {
$this->userBackend->initializeHomeDir($user->getUID());
}
} catch (NoUserFoundException $e) {
if ($e->getMessage()) {
$this->logger->warning('Error while trying to login using sso environment variable: ' . $e->getMessage(), ['app' => 'user_saml']);
Expand Down

0 comments on commit 2c18447

Please sign in to comment.