當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserDAO::deleteUser方法代碼示例

本文整理匯總了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;
     }
 }
開發者ID:sbadi,項目名稱:shareatrip,代碼行數:16,代碼來源:UserList_model.php

示例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;
     }
 }
開發者ID:sbadi,項目名稱:shareatrip,代碼行數:18,代碼來源:Notification_model.php

示例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;
     }
 }
開發者ID:sbadi,項目名稱:shareatrip,代碼行數:21,代碼來源:ProfileSettings_model.php

示例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");
}
開發者ID:GoranSubic,項目名稱:smart-restoran,代碼行數:11,代碼來源:deletePage.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']) {
開發者ID:jls14,項目名稱:SpireSessions,代碼行數:31,代碼來源:index.php

示例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));
開發者ID:zxcde,項目名稱:testdb-php,代碼行數:10,代碼來源:test.php

示例7: deleteUser

 public function deleteUser($idUser)
 {
     $managerUser = new UserDAO();
     $managerUser->deleteUser($idUser);
 }
開發者ID:kokno,項目名稱:closeClassroom_german_toson,代碼行數:5,代碼來源:UserController.class.php


注:本文中的UserDAO::deleteUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。