mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-12 21:56:05 +02:00
add a meaningful error message in case a empty uid is given
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
25a2b0829c
commit
b9d5f56d25
|
@ -99,6 +99,12 @@ class SAMLController extends Controller {
|
||||||
$uid = $auth[$uidMapping];
|
$uid = $auth[$uidMapping];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure that a valid UID is given
|
||||||
|
if (empty($uid)) {
|
||||||
|
$this->logger->error('Uid "' . $uid . '" is not a valid uid please check your attribute mapping', ['app' => $this->appName]);
|
||||||
|
throw new \InvalidArgumentException('No valid uid given, please check your attribute mapping. Given uid: ' . $uid);
|
||||||
|
}
|
||||||
|
|
||||||
$userExists = $this->userManager->userExists($uid);
|
$userExists = $this->userManager->userExists($uid);
|
||||||
$autoProvisioningAllowed = $this->userBackend->autoprovisionAllowed();
|
$autoProvisioningAllowed = $this->userBackend->autoprovisionAllowed();
|
||||||
if($userExists === true) {
|
if($userExists === true) {
|
||||||
|
|
Loading…
Reference in a new issue