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


PHP verifyUser函数代码示例

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


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

示例1: registerUser

function registerUser()
{
    $userName = $_POST['userName'];
    # Verify that the user doesn't exist in the database
    $result = verifyUser($userName);
    if ($result['status'] == 'COMPLETE') {
        $email = $_POST['email'];
        $userFirstName = $_POST['userFirstName'];
        $userLastName = $_POST['userLastName'];
        $userPassword = encryptPassword();
        # Make the insertion of the new user to the Database
        $result = registerNewUser($userFirstName, $userLastName, $userName, $email, $userPassword);
        # Verify that the insertion was successful
        if ($result['status'] == 'COMPLETE') {
            # Starting the session
            startSession($userFirstName, $userLastName, $userName);
            echo json_encode($result);
        } else {
            # Something went wrong while inserting the new user
            die(json_encode($result));
        }
    } else {
        # Username already exists
        die(json_encode($result));
    }
}
开发者ID:Kevoe,项目名称:Disenazo,代码行数:26,代码来源:applicationLayer.php

示例2: commitPayment

 public function commitPayment($userId = 0, $payerId, $token, $amt, $itemId)
 {
     $returnObj = array();
     if (verifyUser($userId)) {
         $postDetails = array('USER' => UID, 'PWD' => PASSWORD, 'SIGNATURE' => SIG, 'METHOD' => "DoExpressCheckoutPayment", 'VERSION' => VER, 'AMT' => $amt, 'TOKEN' => $token, 'PAYERID' => $payerId, 'PAYMENTACTION' => "Sale");
         $arrPostVals = array_map(create_function('$key, $value', 'return $key."=".$value."&";'), array_keys($postDetails), array_values($postDetails));
         $postVals = rtrim(implode($arrPostVals), "&");
         $response = runCurl(URLBASE, $postVals);
         //HACK: On sandbox the first request will fail - we need to wait for 2 seconds and then try again
         if ($response == false) {
             sleep(2);
             $response = parseString(runCurl(URLBASE, $postVals));
         } else {
             $response = parseString($response);
         }
         //$returnObj['transactionId'] = $response["PAYMENTINFO_0_TRANSACTIONID"];
         //$returnObj['orderTime'] = $response["PAYMENTINFO_0_ORDERTIME"];
         $returnObj['paymentStatus'] = $response["PAYMENTINFO_0_PAYMENTSTATUS"];
         $returnObj['itemId'] = $itemId;
         $returnObj['userId'] = $userId;
         recordPayment($returnObj);
     }
     return json_encode($returnObj);
 }
开发者ID:nagyistoce,项目名称:Kaltura-Paid-Content-Gallery-With-Stripe,代码行数:24,代码来源:pptransact.php

示例3: verifyUser

<?php

require_once 'template/header.php';
require_once 'functions/productsFunctions.php';
require_once 'functions/categorysFunctions.php';
require_once 'functions/sessionFunctions.php';
verifyUser();
$categorys = retrieveCategorys($connection);
$productId = $_POST['productId'];
$selected = "";
$productData = searchProduct($connection, $productId);
$id = $_POST['id'];
$product = $_POST['product'];
$price = $_POST['price'];
$description = $_POST['description'];
$category = $_POST['category_id'];
if (updateProducts($connection, $id, $product, $price, $description, $category)) {
    $_SESSION['success'] = "Product was successfully updated!";
    header("Location: retrieve.php");
    die;
}
?>

	<div class="col-lg-3"></div>
	<div class="col-lg-6">
		<h1 align="center">Edit Product</h1>
		<hr />
		<form action="update.php" method="post" accept-charset="utf-8">
			<input type="hidden" name="id" value="<?php 
echo $productData['productId'];
?>
开发者ID:ricardoaranha,项目名称:crud-php-mysql,代码行数:31,代码来源:update.php

示例4: session_start

<?php

require 'func.php';
session_start();
$errMsg = array();
if (isset($_POST['submit'])) {
    $username = trim($_POST['username']);
    $password = trim($_POST['password']);
    if (count($errMsg) == 0) {
        $userVerification = verifyUser($username, $password);
        if ($userVerification !== false) {
            $_SESSION['user'] = $userVerification;
            header('location:main.php');
            exit;
        } else {
            array_push($errMsg, 'Wrong username or password');
        }
    }
}
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>TEPDM</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="bootstrap-3.3.5-dist/css/bootstrap.min.css">
    <!-- Optional Bootstrap theme -->
    <link rel="stylesheet" href="bootstrap-3.3.5-dist/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="style/custom.css">
开发者ID:hanstf,项目名称:TEPDM,代码行数:31,代码来源:index.php

示例5: json_encode

            } else {
                echo json_encode(array('status' => false, 'Message' => 'Pin is not correct'));
            }
        } else {
            echo json_encode(array('status' => false, 'Message' => 'User is not Correct'));
        }
    } else {
        echo json_encode(array('status' => false, 'Message' => 'Login not Successfull'));
    }
});
// Get a single car
$app->get('/ministatement/:name/:password/:user_id/:pin', function ($name, $password, $user_id, $pin) use($app) {
    $app->response()->header("Content-Type", "application/json");
    $status = login($name, $password);
    if ($status) {
        $status = verifyUser($user_id);
        if ($status) {
            $status = VerifyPin($user_id, $pin);
            if ($status) {
                $miniStatement = miniStatement('2007');
                if ($miniStatement != null) {
                    echo json_encode(array('status' => true, 'ministatement' => $miniStatement));
                } else {
                    echo json_encode(array('status' => false, 'Message' => 'No mini statement or file not exist'));
                }
            } else {
                echo json_encode(array('status' => false, 'Message' => 'Pin is not correct'));
            }
        } else {
            echo json_encode(array('status' => false, 'Message' => 'User is not Correct'));
        }
开发者ID:jawad2007,项目名称:Rest-Web-Services-using-Slim-Framework,代码行数:31,代码来源:index.php

示例6: trim

<?php

include "mailFunction.php";
if (isset($_GET['verifyStr'])) {
    $verifyStr = trim($_GET['verifyStr']);
    if (verifyUser($verifyStr) == 1) {
        echo "恭喜,您的账户已经激活成功,感谢您使用我们的服务!";
    } else {
        echo "链接失效!如果您已经激活账户,请直接登录。";
    }
} else {
    echo "链接错误,请点击邮件中的链接";
}
开发者ID:JackBuh,项目名称:kindle,代码行数:13,代码来源:activeuser.php

示例7: verifyUser

<?php

//register a new user. Makes plenty of checks against duplicate users and common emails
require "../common.php";
if (!empty($_GET["code"])) {
    verifyUser($_GET['email'], $_GET["code"], $DATABASE);
    die;
}
//TODO: Refactor this section
//if any of these are not set, the page will die
if (empty($_POST["email"]) || empty($_POST["password"]) || empty($_POST["password2"]) || empty($_POST["first-name"]) || empty($_POST["last-name"]) || empty($_POST["zip"]) || empty($_POST["phone"])) {
    error("Missing Field", "You tried to register without completing a required field");
}
if ($_POST["password"] !== $_POST["password2"]) {
    error("Passwords Don't Match", "Your passwords did not match");
}
if (!validEmail($_POST["email"])) {
    error("Invalid Email", "Your email " . $_POST["email"] . " is invalid");
}
if (!validPassword($_POST["password"])) {
    error("Invalid Password", "Your password must be longer than 8 characters in length");
}
//evaluate mailing preferences
$mailing = 1;
if (!isset($_POST["mailing"])) {
    $mailing = 0;
}
//cryptify the password
$password = $_POST["password"];
$hash = password_hash($password, PASSWORD_BCRYPT);
$veriRaw = randomString();
开发者ID:BBKolton,项目名称:EXCO,代码行数:31,代码来源:registeruser.php

示例8: session_start

session_start();
?>
<style type='text/css'>
	.container {
		margin-left:30%;
		float:left;
		width:60%;
	}
</style>	
<?php 
if (isset($_POST['records_username'])) {
    $message = "";
    if ($_POST['records_username'] == $_SESSION["username"]) {
        $message = "";
        $db2 = retrieveUsersDb();
        $message = verifyUser($db2, $_POST['records_username'], $_POST['records_password']);
        if ($message == "Okay for access.") {
            echo '<meta http-equiv="refresh" content="0;url=end of the month report.php" />';
        } else {
            echo $message;
        }
    } else {
        $message = "Error.  This is not your ID!";
        echo $message;
    }
} else {
    ?>
<div class="container" >

<div class="col-lg-6" >
<div class="well">
开发者ID:literarypyro,项目名称:bootstrapped_documenttracking,代码行数:31,代码来源:endofMonth.php

示例9: dbConnect

<?php

require "label.php";
dbConnect();
if (!verifyUser()) {
    header("Location: index.php");
}
$result = mysql_query("SELECT * FROM member where username_upline='{$username}'") or error(mysql_error());
$memnum = mysql_num_rows($result);
displayHeader("Member Area > Genealogy View");
echo "<p align=\"center\"><font size=\"4\">Jumlah Downline langsung anda = ({$memnum}) Orang</font></p>\n";
if ($memnum != 0) {
    echo "<div align=\"center\">\n";
    echo "  <center>\n";
    echo "  <table border=\"0\" cellspacing=\"0\" width=\"700\" cellpadding=\"0\"><font size=\"1\" face=\"Tahoma\" >\n";
    echo "    <tr class=\"frame\">\n";
    echo "      <td width=\"15%\" height=\"25\" align=\"center\"><font face=\"Tahoma\" size=\"1\" color=\"#FFFFFF\"><b>Nama</b></font></td>\n";
    echo "      <td width=\"15%\" height=\"25\" align=\"center\"><font face=\"Tahoma\" size=\"1\" color=\"#FFFFFF\"><b>E-mail</b></font></td>\n";
    echo "      <td width=\"15%\" height=\"25\" align=\"center\"><font face=\"Tahoma\" size=\"1\" color=\"#FFFFFF\"><b>Alamat</b></font></td>\n";
    echo "      <td width=\"10%\" height=\"25\" align=\"center\"><font face=\"Tahoma\" size=\"1\" color=\"#FFFFFF\"><b>Nomor ID</b></font></td>\n";
    echo "      <td width=\"10%\" height=\"25\" align=\"center\"><font face=\"Tahoma\" size=\"1\" color=\"#FFFFFF\"><b>Username</b></font></td>\n";
    echo "      <td width=\"10%\" height=\"25\" align=\"center\"><font face=\"Tahoma\" size=\"1\" color=\"#FFFFFF\"><b>Status</b></font></td>\n";
    echo "      <td width=\"10%\" height=\"25\" align=\"center\"><font face=\"Tahoma\" size=\"1\" color=\"#FFFFFF\"><b>Kota</b></font></td>\n";
    echo "      <td width=\"10%\" height=\"25\" align=\"center\"><font face=\"Tahoma\" size=\"1\" color=\"#FFFFFF\"><b>Next level</b></font></td>\n";
    echo "    </tr>\n";
    $i = 1;
    while ($row = mysql_fetch_array($result)) {
        $i % 2 == 0 ? $bgColor = "#FFFFFF" : ($bgColor = "#E6E6E6");
        echo "    <tr>\n";
        echo "      <td width=\"15%\" height=\"25\" align=\"center\" bgcolor=\"{$bgColor}\"><font face=\"Tahoma\" size=\"1\" color=\"#000080\">{$row['nama']}</td>\n";
        echo "      <td width=\"15%\" height=\"25\" align=\"center\" bgcolor=\"{$bgColor}\"><font face=\"Tahoma\" size=\"1\" color=\"#000080\">{$row['email']}</a></td>\n";
开发者ID:rblagahit,项目名称:IndoMLM,代码行数:31,代码来源:member_genealogy.php

示例10: mysqli_multi_query

    $result = mysqli_multi_query($con, $sql);
    if ($result) {
        sendPackage($con, $package, true, "", "ATTENDANCE ADDED");
    } else {
        queryFailed($con, 2.1);
    }
} else {
    if (isset($_POST["PostComment"], $_POST["LoginID"], $_POST["LoginPass"], $_POST["Data"], $_POST["To"]) && $_POST["PostComment"] != "" && $_POST["LoginID"] != "" && $_POST["LoginPass"] != "" && $_POST["Data"] != "" && $_POST["To"] != "") {
        #Connect to database
        $con = dbConnect();
        #Get clean variables from POST
        $EventID = mysqli_real_escape_string($con, $_POST["PostComment"]);
        $CommentText = mysqli_real_escape_string($con, $_POST["Data"]);
        $To = mysqli_real_escape_string($con, $_POST["To"]);
        $LoginID = mysqli_real_escape_string($con, $_POST["LoginID"]);
        $LoginPass = mysqli_real_escape_string($con, $_POST["LoginPass"]);
        #Verify User
        verifyUser($con, $LoginID, $LoginPass);
        $CommentDate = currentDate();
        $package = array();
        $sql = "UPDATE comments SET commenttext = '{$CommentText}', commentdate = '{$CommentDate}' WHERE author = '{$LoginID}' AND username = '{$To}' AND eventid = '{$EventID}'";
        $result = mysqli_multi_query($con, $sql);
        if ($result) {
            sendPackage($con, $package, true, "", "COMMENT TEXT ADDED");
        } else {
            queryFailed($con, 2.1);
        }
    } else {
        missingParams();
    }
}
开发者ID:boramakar,项目名称:Fayton,代码行数:31,代码来源:comments.php

示例11: verifyUser

<?php

include 'include_config.php';
verifyUser(9);
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <?php 
include 'include_head.php';
?>
    <title><?php 
echo SITE_TITLE;
?>
</title>
    <?php 
include 'include_css.php';
?>
        <!-- bootstrap carosel -->
    <link href="css/bootstrap-carousel.css" rel="stylesheet">
  </head>
  <body>
    <?php 
include 'include_nav.php';
?>
    <!-- START Page Content -->
    <div class="container">
      <div class="row">
        <div class="col-lg-4 text-center">
          <div class="panel panel-default">
            <div class="panel-heading"><strong>Coordinators</strong></div>
开发者ID:javelinorg,项目名称:Postgres_XL_Dashboard,代码行数:31,代码来源:index.php

示例12: addLink

        $response = addLink($_REQUEST['from_url'], $_REQUEST['from_url_param'], $_REQUEST['to_url'], $_REQUEST['to_url_param'], $_REQUEST['note']);
        break;
    case "delete_link":
        $response = deleteLink($_REQUEST['from_url'], $_REQUEST['from_url_param'], $_REQUEST['to_url'], $_REQUEST['to_url_param']);
        break;
    case "get_links":
        $response = getLinks($_REQUEST['url'], $_REQUEST['url_param']);
        break;
    case "rate_link":
        $response = rateLink($_REQUEST['from_url'], $_REQUEST['from_url_param'], $_REQUEST['to_url'], $_REQUEST['to_url_param'], $_REQUEST['up']);
        break;
    case "get_link_comment":
        $response = getLinkComment($_REQUEST['from_url'], $_REQUEST['from_url_param'], $_REQUEST['to_url'], $_REQUEST['to_url_param']);
        break;
    case "verify_user":
        $response = verifyUser($_REQUEST['confirm_code']);
        break;
    case "invite_user":
        $response = inviteUser($_REQUEST['email']);
        break;
    case "get_title":
        $response = getTitle($_REQUEST['url'], $_REQUEST['url_param']);
        break;
    case "update_title":
        $response = updateTitle($_REQUEST['url'], $_REQUEST['url_param'], $_REQUEST['title']);
        break;
}
mysql_close($connection);
if ($_REQUEST['command'] == "verify_user") {
    echo "<html>";
    echo "<head> <title> User verification </title></head>";
开发者ID:qing3gan,项目名称:socialcobs,代码行数:31,代码来源:do_command.php

示例13: session_start

<?php

session_start();
include "messagesFns.php";
//获得用户登录的信息
$username = $_POST['username'];
$password = $_POST['password'];
//验证用户信息
$res = verifyUser($username, $password);
if ($res) {
    $_SESSION['validUser'] = $res['username'];
    $_SESSION['validUid'] = $res['uid'];
    $uid = $res['uid'];
    $sid = md5($uid);
    header("Location: http://1.softyun.sinaapp.com/messages/list.php");
} else {
    header("Location: http://1.softyun.sinaapp.com/messages/login.php");
}
exit;
开发者ID:rsmelody,项目名称:learngit,代码行数:19,代码来源:loginValid.php

示例14: file_put_contents

global $logTxt;
file_put_contents($logTxt, "NEW TRANSMISSION START\n", FILE_APPEND | LOCK_EX);
foreach ($_POST as $param_name => $param_val) {
    file_put_contents($logTxt, '**$_POST** [' . $timestamp . ']' . " Param: {$param_name}; Value: {$param_val}\n", FILE_APPEND | LOCK_EX);
}
#######END OF LOGGING
####CREATE GROUP####
if (isset($_POST["CreateGroup"], $_POST["AdminID"], $_POST["AdminPass"], $_POST["GroupName"], $_POST["GroupDescription"]) && $_POST["AdminID"] != "" && $_POST["AdminPass"] != "" && $_POST["GroupName"] != "" & $_POST["GroupDescription"] != "") {
    #Connect to database
    $con = dbConnect();
    #Get clean variables from POST
    $GroupName = mysqli_real_escape_string($con, $_POST["GroupName"]);
    $GroupDescription = mysqli_real_escape_string($con, $_POST["GroupDescription"]);
    $AdminID = mysqli_real_escape_string($con, $_POST["AdminID"]);
    $AdminPass = mysqli_real_escape_string($con, $_POST["AdminPass"]);
    #Verify User
    verifyUser($con, $AdminID, $AdminPass);
    $package = array();
    $sql = "INSERT INTO groups (description, name) VALUES ('{$GroupDescription}', '{$GroupName}')";
    $result = mysqli_query($con, $sql);
    if (!$result) {
        queryFailed($con, 2.1);
    }
    $result = mysqli_query($con, "SELECT LAST_INSERT_ID()");
    $ChatID = mysqli_fetch_row($result)[0];
    $chatFile = $chatDir . "Group_{$ChatID}.txt";
    file_put_contents($chatFile, "[" . date('Y-m-d H:i:s') . "] {$GroupName} group created!\n", FILE_APPEND | LOCK_EX);
    sendPackage($con, $package, true, "", "GROUP ADDED");
} else {
    missingParams();
}
开发者ID:boramakar,项目名称:Fayton,代码行数:31,代码来源:createGroup.php

示例15: newPDO

<?php 
include "common.php";
//remember to set cookie
if (isset($_COOKIE['user'])) {
    $user = $_COOKIE['user'];
    $id = $_COOKIE['id'];
    $db = newPDO();
    if (verifyUser($id, $db)) {
        header('Location: home.php');
    } else {
        header('Location: userinfo.php');
    }
} else {
    header('Location: index.php');
}
// check user exists in our database, if so, redirect to home.php
//if not, store the user, ask its university, class standing...
开发者ID:jiangj4,项目名称:ScheduleMe,代码行数:17,代码来源:start.php


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