本文整理汇总了PHP中UserDAO::deleteUser方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDAO::deleteUser方法的具体用法?PHP UserDAO::deleteUser怎么用?PHP UserDAO::deleteUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDAO
的用法示例。
在下文中一共展示了UserDAO::deleteUser方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteUserModel
function deleteUserModel($userId)
{
try {
$responseDTO = new ResponseDTO(DELETE_FRIEND_FORM);
$userDAO = new UserDAO();
$oldUser = $userDAO->deleteUser($userId);
$responseDTO->setResponseSucc("#friend" . $userId);
return $responseDTO;
} catch (PDOException $pdoe) {
throw $pdoe;
} catch (UserNotAuthenticatedExceptionDTO $authExp) {
throw $authExp;
} catch (Exception $e) {
throw $e;
}
}
示例2: denyRegistrationModel
public function denyRegistrationModel($userId, $userForm)
{
$formObjRaw = new FormDTO(DENY_REGISTRATION_FORM, $userForm);
$responseDTO = new ResponseDTO(DENY_REGISTRATION_FORM);
try {
$formDataObj = $formObjRaw->getFormData();
$userDAO = new UserDAO();
$userDTO = $userDAO->deleteUser($userId);
$notificationDAO = new NotificationDAO();
$notificationDAO->setNotificationAsRead($formDataObj[DENY_REGISTRATION_FORM . NOTIFICATIONID]);
$responseDTO->setResponseSucc($formDataObj[DENY_REGISTRATION_FORM . NOTIFICATIONID]);
return $responseDTO;
} catch (PDOException $pdoe) {
throw $pdoe;
} catch (Exception $e) {
throw $e;
}
}
示例3: deleteUserModel
function deleteUserModel()
{
$responseDTO = new ResponseDTO(DELETE_USER_FORM);
try {
$userLogged = SessionUtils::getUserLogged();
$userDAO = new UserDAO();
$deletedUser = $userDAO->deleteUser($userLogged->getUserId());
if ($deletedUser != 1) {
$responseDTO->setErrField(ERROR_RESPONSE, "Errore durante l'eliminazione dell'album");
} else {
$responseDTO->setResponseSucc("Bye bye");
}
return $responseDTO;
} catch (PDOException $pdoe) {
throw $pdoe;
} catch (UserNotAuthenticatedExceptionDTO $authExp) {
throw $authExp;
} catch (Exception $e) {
throw $e;
}
}
示例4: UserDAO
<?php
include_once "connection/DbConnection.php";
include "class/UserDAO.php";
$userDao = new UserDAO();
if (isset($_GET['delU'])) {
$delU = $_GET['delU'];
$userDao->deleteUser($delU);
//goto('showUsers.php');
header("Location: showUsers.php");
}
示例5: elseif
if ($fnHash['ok']) {
JsonResponse::sendResponse(200, $fnHash['reason']);
} else {
JsonResponse::sendResponse(400, $fnHash['reason']);
}
} elseif ($_SERVER['REQUEST_METHOD'] === "PUT" && User::isAdmin($_SESSION['user_type'])) {
$logger->writeLog("Updating: " . $request_data->id);
$fnHash = UserDAO::updateUser($request_data->id, $request_data->email, $request_data->first_name, $request_data->last_name, $request_data->phone_nbr, $request_data->facebook_id, $request_data->twitter_id, $request_data->google_id, $request_data->tumblr_id, $request_data->instagram_id, $request_data->img_url, $request_data->img_file_path);
if ($fnHash['ok']) {
JsonResponse::sendResponse(200, $fnHash['reason']);
} else {
JsonResponse::sendResponse(400, $fnHash['reason']);
}
} elseif ($_SERVER['REQUEST_METHOD'] === "DELETE" && User::isAdmin($_SESSION['user_type'])) {
$user_id = $_GET['user'];
$fnHash = UserDAO::deleteUser($user_id);
$logger->writeLog("fnHash['ok'] = " . $fnHash['ok']);
if ($fnHash['ok']) {
JsonResponse::sendResponse(200, $fnHash['reason']);
} else {
JsonResponse::sendResponse(400, $fnHash['reason']);
}
} else {
JsonResponse::sendResponse(404, "Invalid Spire API Request");
}
} elseif (isset($_GET['vote'])) {
if ($_SERVER['REQUEST_METHOD'] === "GET") {
if (isset($_GET['uservote'])) {
$fnHash = VoteDAO::getSessionUserVote($_GET['session_id'], $_SESSION['user']);
$logger->writeLog("fnHash['ok'] = " . json_encode($fnHash));
if ($fnHash['ok']) {
示例6:
<?php
include "../Database/UserDAO.php";
$listUser = UserDAO::getAllUser(3, 2);
$username = "UUU9";
$password = "PPP9";
$created_date = "2013-04-02";
$role = "ROLE_USER";
$result = UserDAO::deleteUser(19);
var_dump("AAA: " . $result . '------' . json_encode($listUser));
示例7: deleteUser
public function deleteUser($idUser)
{
$managerUser = new UserDAO();
$managerUser->deleteUser($idUser);
}