mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-04-28 15:24:52 +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];
|
||||
}
|
||||
|
||||
// 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);
|
||||
$autoProvisioningAllowed = $this->userBackend->autoprovisionAllowed();
|
||||
if($userExists === true) {
|
||||
|
|
Loading…
Reference in a new issue