Skip to content

Commit

Permalink
correct user class cascade logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jsavell committed Jul 3, 2024
1 parent d82ab64 commit d6eabeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pipit/Classes/Site/CoreSite.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function setUser() {
throw new ConfigurationException("Configured User class not found: {$className}");
}
}
if ($userClass && is_bool($config['USESAML']) && $config['USESAML']) {
if (!$userClass && is_bool($config['USESAML']) && $config['USESAML']) {
if ($config['SAML_USER_REPO']) {
$userRepo = $this->getDataRepository($config['SAML_USER_REPO']);
if ($userRepo instanceof \Pipit\Interfaces\DataRepository) {
Expand All @@ -68,7 +68,7 @@ protected function setUser() {
throw new ConfigurationException("UserSAML requires SAML_USER_REPO to be defined with a Pipit\Interfaces\DataRepository");
}
}
if ($userClass && is_bool($config['USECAS']) && $config['USECAS']) {
if (!$userClass && is_bool($config['USECAS']) && $config['USECAS']) {
if ($config['CAS_USER_REPO']) {
$userRepo = $this->getDataRepository($config['CAS_USER_REPO']);
if ($userRepo instanceof \Pipit\Interfaces\DataRepository) {
Expand Down

0 comments on commit d6eabeb

Please sign in to comment.