diff options
author | Björn Schießle <bjoern@schiessle.org> | 2019-01-24 16:58:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-24 16:58:11 +0300 |
commit | 577f612267f95d3204247e4cfe743a8e47b0600f (patch) | |
tree | 109c24e8f8d769ef590e340849a071b800d77c87 /lib/Controller | |
parent | 9b98504c6f0d13dc395b3fc2dfe38872e8c0dbf2 (diff) | |
parent | ec593bce13db99d5f1770a6f5673ed66901af911 (diff) |
Merge pull request #286 from nextcloud/fix-268
always create user in the SAML back-end and update the attributes
Diffstat (limited to 'lib/Controller')
-rw-r--r-- | lib/Controller/SAMLController.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php index 902199a4..8f508b22 100644 --- a/lib/Controller/SAMLController.php +++ b/lib/Controller/SAMLController.php @@ -284,7 +284,10 @@ class SAMLController extends Controller { if (!($user instanceof IUser)) { throw new \InvalidArgumentException('User is not valid'); } - $user->updateLastLoginTimestamp(); + $firstLogin = $user->updateLastLoginTimestamp(); + if($firstLogin) { + $this->userBackend->initializeHomeDir($user->getUID()); + } } catch (\Exception $e) { $this->logger->logException($e, ['app' => $this->appName]); return new Http\RedirectResponse($this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.notProvisioned')); |