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


PHP checkCodeExists函数代码示例

本文整理汇总了PHP中checkCodeExists函数的典型用法代码示例。如果您正苦于以下问题:PHP checkCodeExists函数的具体用法?PHP checkCodeExists怎么用?PHP checkCodeExists使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: emailCodeAuthentication

function emailCodeAuthentication()
{
    global $EmailVerifyService;
    $app = \Slim\Slim::getInstance();
    $app->response->headers->set('Content-Type', 'application/json');
    $app->response->setStatus(200);
    $user_id = $app->request()->params("user_id");
    $email_id = $app->request()->params("email");
    $code = $app->request()->params("code");
    $result = checkCodeExists($code);
    if (!empty($result)) {
        $EmailVerifyService->verifyEmail($code);
        $messages = "Authenticate Successfully";
        $return_data = array("response_status" => '1', "response_message" => $messages);
        $app->response->setBody(json_encode($return_data));
    } else {
        $messages = "Invalid Code Please try again";
        $return_data = array("response_status" => '0', "response_message" => $messages);
        $app->response->setBody(json_encode($return_data));
    }
}
开发者ID:hardikamutech,项目名称:hammu,代码行数:21,代码来源:index_16_6_2015.php

示例2: emailCodeAuthentication

function emailCodeAuthentication()
{
    global $EmailVerifyService;
    global $language;
    $app = \Slim\Slim::getInstance();
    $app->response->headers->set('Content-Type', 'application/json');
    $app->response->setStatus(200);
    //Lang Call Start
    $hammu_lang_id = $app->request()->params("lang_id");
    if (!empty($hammu_lang_id)) {
        getCurrentLanguages($hammu_lang_id);
    }
    //Lang Call end
    $user_id = $app->request()->params("user_id");
    $email_id = $app->request()->params("email");
    $code = $app->request()->params("code");
    $result = checkCodeExists($code);
    if (!empty($result)) {
        $EmailVerifyService->verifyEmail($code);
        checkUserOnline($user_id);
        $messages = $language->text("hammu", "email_auth_success");
        //"Authenticate Successfully";
        $return_data = array("response_status" => '1', "response_message" => $messages);
        $app->response->setBody(json_encode($return_data));
    } else {
        $messages = $language->text("hammu", "email_invalid_code");
        //"Invalid Code Please try again";
        $return_data = array("response_status" => '0', "response_message" => $messages);
        $app->response->setBody(json_encode($return_data));
    }
}
开发者ID:bhushansonar,项目名称:hammu,代码行数:31,代码来源:index_4_7_2015.php

示例3: emailCodeAuthentication

function emailCodeAuthentication()
{
    global $EmailVerifyService;
    $app = \Slim\Slim::getInstance();
    $app->response->headers->set('Content-Type', 'application/json');
    $app->response->setStatus(200);
    $user_id = $app->request()->params("user_id");
    $email_id = $app->request()->params("email");
    $code = $app->request()->params("code");
    $lang_id = (int) $app->request()->params("lang_id");
    $currentLanguageId = getCurrentLanguages($lang_id);
    $result = checkCodeExists($code);
    if (!empty($result)) {
        $EmailVerifyService->verifyEmail($code);
        checkUserOnline($user_id);
        if ($currentLanguageId == '32') {
            $messages = "Authentifikation erfolgreich";
        } else {
            if ($currentLanguageId == '33') {
                $messages = "Autenticación correcta";
            } else {
                $messages = "Authentification successfull";
            }
        }
        $return_data = array("response_status" => '1', "response_message" => $messages);
        $app->response->setBody(json_encode($return_data));
    } else {
        if ($currentLanguageId == '32') {
            $messages = "Ungültiger Sicherheitscode. Bitte versuchen Sie es nochmals!";
        } else {
            if ($currentLanguageId == '33') {
                $messages = "Código incorrecto Inténtelo de nuevo";
            } else {
                $messages = "Invalid Code. Please try again!";
            }
        }
        $return_data = array("response_status" => '0', "response_message" => $messages);
        $app->response->setBody(json_encode($return_data));
    }
}
开发者ID:hardikamutech,项目名称:hammu,代码行数:40,代码来源:index_23-6-2015.php


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