本文整理汇总了PHP中Authenticate::checkCode方法的典型用法代码示例。如果您正苦于以下问题:PHP Authenticate::checkCode方法的具体用法?PHP Authenticate::checkCode怎么用?PHP Authenticate::checkCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Authenticate
的用法示例。
在下文中一共展示了Authenticate::checkCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
if (empty($userid)) {
event::fire('HAX_CONFIRMATION_USERID');
$msg = 'The User Identifcation code is empty, did you tamper with the URL?';
return;
}
if (!preg_match('/^[a-fA-F0-9]+$/', $code)) {
event::fire('HAX_CONFIRMATION_CODE');
$msg = 'The confirmation code is borked, did you tamper with the URL?';
return;
}
if (strlen($code) < 32) {
event::fire('HAX_CONFIRMATION_CODE');
$msg = 'The confirmation code is borked, did you tamper with the URL?';
return;
}
if ($auth->checkCode($userid, $code)) {
$isConfirmed = 1;
$auth->verifyUser($userid);
} else {
$msg = 'Confirmation code is wrong. <a href=\\"#\\">Click here to recieve another one.</a>';
return;
}
}
if (isset($_POST['login'])) {
$op = $_POST['op'];
$dest = $_POST['dest'];
if ($op !== 'new' && $op !== 'login') {
die('Unknown request');
}
$email = $_POST['email'];
$password = $_POST['password'];