本文整理汇总了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));
}
}
示例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));
}
}
示例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));
}
}