本文整理匯總了PHP中Alert::accountLocked方法的典型用法代碼示例。如果您正苦於以下問題:PHP Alert::accountLocked方法的具體用法?PHP Alert::accountLocked怎麽用?PHP Alert::accountLocked使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Alert
的用法示例。
在下文中一共展示了Alert::accountLocked方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: encrypt_decrypt
//chech if user exist
if ($user->searchUser($username)) {
//check if account is locked
if ($user->retries > 0) {
//check if password is correct
if ($user->comparePassword($password)) {
//reset retries if authentication is successful
$user->resetRetries();
//set Authentication value through session. In this case, the value of session id
#$_SESSION['id'] = encrypt_decrypt("encrypt", $user->id);
$_SESSION['userID'] = $user->id;
//unset all set error messages
unset($_SESSION['alert']);
//getMemtype to facilitate navigation
$_SESSION['memtype'] = $memtype = $user->getMemtype();
header('Location: ../choose_subject.php');
} else {
$user->updateRetries();
$_SESSION['alert'] = Alert::loginFailedShowRetries($user->retries - 1);
header('Location: ../index.php');
}
} else {
$_SESSION['alert'] = Alert::accountLocked();
header('Location: ../index.php');
}
} else {
$_SESSION['alert'] = Alert::loginFailed();
header('Location: ../index.php');
}
} else {
}