diff --git a/lam/templates/account/edit.php b/lam/templates/account/edit.php index 6374cdcc6..93bfc0edb 100644 --- a/lam/templates/account/edit.php +++ b/lam/templates/account/edit.php @@ -71,9 +71,9 @@ } // cleanup account containers in session -$cleanupCandidates = array(); +$cleanupCandidates = []; foreach ($_SESSION as $key => $value) { - if (strpos($key, $sessionAccountPrefix) === 0) { + if (str_starts_with($key, $sessionAccountPrefix)) { $cleanupCandidates[] = $key; } $candidateCount = sizeof($cleanupCandidates); @@ -151,10 +151,10 @@ function cleanDn(string $dn) : string { $cleanDn = str_replace("\\'", '', $dn); if ($dn == $cleanDn) { - if (substr($cleanDn, 0, 1) === "'") { + if (str_starts_with($cleanDn, "'")) { $cleanDn = substr($cleanDn, 1); } - if (substr($cleanDn, -1, 1) === "'") { + if (str_ends_with($cleanDn, "'")) { $cleanDn = substr($cleanDn, 0, -1); } }