当前位置: 首页>>代码示例>>PHP>>正文


PHP captcha::invalidate_captcha方法代码示例

本文整理汇总了PHP中captcha::invalidate_captcha方法的典型用法代码示例。如果您正苦于以下问题:PHP captcha::invalidate_captcha方法的具体用法?PHP captcha::invalidate_captcha怎么用?PHP captcha::invalidate_captcha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在captcha的用法示例。


在下文中一共展示了captcha::invalidate_captcha方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 /**
  * @return bool true
  */
 function complete_login()
 {
     global $plugins, $db, $mybb, $session;
     $user =& $this->login_data;
     $plugins->run_hooks('datahandler_login_complete_start', $this);
     // Login to MyBB
     my_setcookie('loginattempts', 1);
     my_setcookie("sid", $session->sid, -1, true);
     $ip_address = $db->escape_binary($session->packedip);
     $db->delete_query("sessions", "ip = {$ip_address} AND sid != '{$session->sid}'");
     $newsession = array("uid" => $user['uid']);
     $db->update_query("sessions", $newsession, "sid = '{$session->sid}'");
     $db->update_query("users", array("loginattempts" => 1), "uid = '{$user['uid']}'");
     $remember = null;
     if (!isset($mybb->input['remember']) || $mybb->input['remember'] != "yes") {
         $remember = -1;
     }
     my_setcookie("mybbuser", $user['uid'] . "_" . $user['loginkey'], $remember, true);
     if ($this->captcha !== false) {
         $this->captcha->invalidate_captcha();
     }
     $plugins->run_hooks('datahandler_login_complete_end', $this);
     return true;
 }
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:27,代码来源:login.php

示例2: error

         $dst_auto_selected = "selected=\"selected\"";
     } else {
         if ($mybb->get_input('dstcorrection', MyBB::INPUT_INT) == 1) {
             $dst_enabled_selected = "selected=\"selected\"";
         } else {
             $dst_disabled_selected = "selected=\"selected\"";
         }
     }
     $regerrors = inline_error($errors);
     $mybb->input['action'] = "register";
     $fromreg = 1;
 } else {
     $user_info = $userhandler->insert_user();
     // Invalidate solved captcha
     if ($mybb->settings['captchaimage']) {
         $captcha->invalidate_captcha();
     }
     if ($mybb->settings['regtype'] != "randompass" && !isset($mybb->cookies['coppauser'])) {
         // Log them in
         my_setcookie("mybbuser", $user_info['uid'] . "_" . $user_info['loginkey'], null, true);
     }
     if (isset($mybb->cookies['coppauser'])) {
         $lang->redirect_registered_coppa_activate = $lang->sprintf($lang->redirect_registered_coppa_activate, $mybb->settings['bbname'], $user_info['username']);
         my_unsetcookie("coppauser");
         my_unsetcookie("coppadob");
         $plugins->run_hooks("member_do_register_end");
         error($lang->redirect_registered_coppa_activate);
     } else {
         if ($mybb->settings['regtype'] == "verify") {
             $activationcode = random_str();
             $now = TIME_NOW;
开发者ID:nicopinto,项目名称:fantasitura.com,代码行数:31,代码来源:member.php

示例3: elseif

             }
         }
     }
 }
 // One or more errors returned, fetch error list and throw to newreply page
 if (count($post_errors) > 0) {
     $reply_errors = inline_error($post_errors, '', $json_data);
     $mybb->input['action'] = "newreply";
 } else {
     $postinfo = $posthandler->insert_post();
     $pid = $postinfo['pid'];
     $visible = $postinfo['visible'];
     $closed = $postinfo['closed'];
     // Invalidate solved captcha
     if ($mybb->settings['captchaimage'] && !$mybb->user['uid']) {
         $post_captcha->invalidate_captcha();
     }
     $force_redirect = false;
     // Deciding the fate
     if ($visible == -2) {
         // Draft post
         $lang->redirect_newreply = $lang->draft_saved;
         $url = "usercp.php?action=drafts";
     } elseif ($visible == 1) {
         // Visible post
         $lang->redirect_newreply .= $lang->redirect_newreply_post;
         $url = get_post_link($pid, $tid) . "#pid{$pid}";
     } else {
         // Moderated post
         $lang->redirect_newreply .= '<br />' . $lang->redirect_newreply_moderation;
         $url = get_thread_link($tid);
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:newreply.php

示例4: error

     } else {
         $correct = true;
     }
 }
 if (!empty($errors)) {
     $mybb->input['action'] = "login";
     $mybb->input['request_method'] = "get";
     $inline_errors = inline_error($errors);
 } else {
     if ($correct) {
         if ($user['coppauser']) {
             error($lang->error_awaitingcoppa);
         }
         // Invalidate captcha
         if ($login_captcha !== false) {
             $login_captcha->invalidate_captcha();
         }
         my_setcookie('loginattempts', 1);
         $db->delete_query("sessions", "ip='" . $db->escape_string($session->ipaddress) . "' AND sid != '" . $session->sid . "'");
         $newsession = array("uid" => $user['uid']);
         $db->update_query("sessions", $newsession, "sid='" . $session->sid . "'");
         $db->update_query("users", array("loginattempts" => 1), "uid='{$user['uid']}'");
         if ($mybb->input['remember'] != "yes") {
             $remember = -1;
         } else {
             $remember = null;
         }
         my_setcookie("mybbuser", $user['uid'] . "_" . $user['loginkey'], $remember, true);
         my_setcookie("sid", $session->sid, -1, true);
         $plugins->run_hooks("member_do_login_end");
         if ($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false) {
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:member.php


注:本文中的captcha::invalidate_captcha方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。