本文整理汇总了PHP中Connect::getUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Connect::getUser方法的具体用法?PHP Connect::getUser怎么用?PHP Connect::getUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Connect
的用法示例。
在下文中一共展示了Connect::getUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUser
public static function getUser()
{
global $params;
self::echoJSON(Connect::getUser($params['id']));
}
示例2: Connect
<?php
include 'dbConnection.php';
$conn = new Connect();
$user = $_POST['usuario'];
$verifi = $_POST['verificacion'];
$ver = $conn->getUser($verifi);
if ($ver['rol'] == 1) {
$conn->deleteUser($user);
header("location: users.php?task=deletedSucessfully");
} else {
header("location: form.php?error=NoPermision");
}
示例3: header
<?php
include 'dbConnection.php';
if (isset($_POST['usuario']) && $_POST['usuario'] != null) {
$usuario = $_POST['usuario'];
} else {
header("location: form.php?error=UserMissing");
exit;
}
if (isset($_POST['pass']) && $_POST['pass'] != null) {
$password = $_POST['pass'];
} else {
header("location: form.php?error=PasswordMissing");
exit;
}
$conn = new Connect();
$user = $conn->getUser($usuario);
if ($user['password'] == $password) {
$_SESSION['usuario'] = $user['usuario'];
header("location: index.php");
} else {
header("location: form.php?error=WrongPassword");
exit;
}