Skip to content

Commit

Permalink
fixing edipi syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
vbhayden authored Jan 30, 2024
1 parent 8cf9ea6 commit 28ff32e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,17 @@ private function get_expected_username($cert) {
* This will return the default username
*/
private function get_edipi_number($cert, $edipiProperty) {

$certHasProperty = property_exists($cert, $edipiProperty);
if ($certHasProperty == false)
return null;

$edipiRaw = $cert->$edipiProperty;

$edipiParsedAsString = is_string($edipiRaw);
if ($edipiParsedAsString == false)
return null;

$edipiParts = explode(".", $edipiRaw);
$edipiLastPart = end($edipiParts);

Expand Down

0 comments on commit 28ff32e

Please sign in to comment.