当前位置: 首页>>代码示例>>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;未经允许,请勿转载。