diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-03-14 16:58:20 +0300 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-03-14 19:53:07 +0300 |
commit | bed32b460fdba7d8d8ef0586c63272c6d2575643 (patch) | |
tree | 4e402dca076ef5df4ca61cc51155df5e330beed1 /lib | |
parent | 2d167fd365e64c291f1bcd50ddaf9d6644034043 (diff) |
try to lookup a user if the uid does not resolve and autoprov is disabled
it might well may be that the user exists but is not yet known to the
specific backend in Nextcloud and need to be mapped first.
This assumes that searching for the uid will actually find the user. This
is not necessarily given by the backend configuration.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/SAMLController.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php index b3e53d4d..aa4c163f 100644 --- a/lib/Controller/SAMLController.php +++ b/lib/Controller/SAMLController.php @@ -121,6 +121,13 @@ class SAMLController extends Controller { } if(!$userExists && !$autoProvisioningAllowed) { + // it is possible that the user was not logged in before and + // thus is not known to the original backend. A search can + // help with it and make the user known + $this->userManager->search($uid); + if($this->userManager->userExists($uid)) { + return; + } throw new NoUserFoundException(); } elseif(!$userExists && $autoProvisioningAllowed) { $this->userBackend->createUserIfNotExists($uid); |