本文整理汇总了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 {
}