$userAccount, 'password' => $userPassword, 'policy' => $toPolicy, 'skin'=>$toSkin); if ($sessionID != '') $accountInformation['sessionID'] = $sessionID; if ($userAccount != '' and $userPassword != '') { $result = userAuthentication($userAccount, $userPassword, $accountInformation, $toPolicy); // ??? toPolicy benne van az AccountInformation-ben!!! Ldap backend only? logLogin($toPolicy, $userAccount, $result); if ($result === _AUTH_SUCCESS) { $sessionID = newSession($accountInformation, $toPolicy); if ($toSkin == '') $toSkin = $skin; header('Location: '.location("index.php?page=$toPage&sub=$toSub&f=$toF&sessionID=$sessionID&policy=$toPolicy&lang=$lang&skin=$toSkin", array('alertOLD'))); } elseif ($result === _AUTH_EXPIRED) { $_SESSION['alert'][] = 'message:force_pw_update'; header('Location: '.location("index.php?policy=public&page=password&f=changeMyPassword&userAccount=".$userAccount."&toPolicy=$toPolicy&skin=$toSkin", array('alertOLD'))); } elseif ($result >= _AUTH_FAILURE) { // sikertelen azonosítás - a hibaüzenetet a függvény generálja //$NOF = @getFailedLoginCount($toPolicy,$userAccount); //if ($NOF>1) sleep(min($NOF,10,rand(1,10))); // harden brute force attempts } else { // Ilyen csak hibás függvényműködés esetén lehet: $_SESSION['alert'][] = "message:default:hibás visszatérési érték:userAuthentication:($result)"; } } else { $_SESSION['alert'][] = 'message:empty_field'; } } ?>