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


PHP UserController::delete方法代码示例

本文整理汇总了PHP中UserController::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP UserController::delete方法的具体用法?PHP UserController::delete怎么用?PHP UserController::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserController的用法示例。


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

示例1: UserController

     $user = new UserController();
     $user->logout();
     break;
 case "register":
     include_once "controllers/UserController.php";
     $user = new UserController();
     $user->register();
     break;
 case "user":
     include_once "controllers/UserController.php";
     $user = new UserController();
     if ($_GET["action"] == "update") {
         $user->update();
     }
     if ($_GET["action"] == "delete") {
         $user->delete();
     }
     break;
 case "profile":
     include_once "controllers/UserController.php";
     $user = new UserController();
     $user->profile();
     break;
 case "dashboard":
     include_once "controllers/DashboardController.php";
     $dashboard = new dashboardController();
     $dashboard->render();
     break;
 case "app":
     include_once "controllers/AppController.php";
     $app = new appController();
开发者ID:asancheza,项目名称:box,代码行数:31,代码来源:index.php

示例2: testDelete

 /**
  * Tests the update function in the UserController
  * @param  void
  * @return void
  */
 public function testDelete()
 {
     Input::replace($this->userData);
     $user = new UserController();
     $user->store();
     $user->delete(1);
     $usersSaved = User::withTrashed()->find(1);
     $this->assertNotNull($usersSaved->deleted_at);
 }
开发者ID:BaobabHealthTrust,项目名称:iBLIS,代码行数:14,代码来源:UserControllerTest.php

示例3:

     break;
 case "save":
     $vars['edittype'] = $_POST['edittype'];
     $vars['password'] = $_POST['password'];
     $vars['password2'] = $_POST['password2'];
     $vars['id'] = $_POST['id'];
     $vars['user_id'] = $_POST['user_id'];
     $vars['user_name'] = $_POST['user_name'];
     $vars['title'] = $_POST['title'];
     $vars['level'] = $_POST['level'];
     $vars['email'] = $_POST['email'];
     $vars['active'] = $_POST['active'];
     $user->save($p, $vars);
     break;
 case "delete":
     $user->delete($id);
     break;
 case "batchDelete":
     $ids = $_POST['del'];
     $user->batchDelete($p, $ids);
     break;
 case "chgpasswd":
     $user->chgpasswd($id);
     break;
 case "chgpasswdsave":
     $vars = $_POST;
     $user->chgpasswdsave($vars);
     break;
 default:
     $user->browse();
     break;
开发者ID:jcandrew1966,项目名称:as_woodhouse,代码行数:31,代码来源:user.php

示例4: __construct

include_once '../models/UserModel.php';
class UserController extends ParentController
{
    public function __construct()
    {
        $this->model = new UserModel();
    }
}
$controller = new UserController();
if (isset($_GET["get"]) && isset($HTTP_RAW_POST_DATA)) {
    $json = json_decode($controller->getWhere(null, json_decode($HTTP_RAW_POST_DATA)->data));
    if ($json->affected_rows === 1) {
        session_start();
        $_SESSION["id_usuario"] = $json->objects[0]->id_usuario;
        $_SESSION["rol"] = $json->objects[0]->usu_rol;
        $_SESSION["nombres"] = $json->objects[0]->usu_nombres;
        $_SESSION['apellidos'] = $json->objects[0]->usu_apellidos;
        $_SESSION['usuario'] = $json->objects[0]->usu_usuario;
    }
    print json_encode(array("success" => $json->affected_rows === 1, "user" => $json->objects[0]));
    if (isset($_GET["login"])) {
    }
} else {
    if (isset($_GET["save"]) && isset($HTTP_RAW_POST_DATA)) {
        print $controller->save($_GET["save"], json_decode($HTTP_RAW_POST_DATA)->data);
    } else {
        if (isset($_GET["delete"])) {
            print $controller->delete($_GET["delete"]);
        }
    }
}
开发者ID:ricaralan,项目名称:abarrotera,代码行数:31,代码来源:UserController.php

示例5: function

    UserController::process_login();
});
$routes->post('/user/save', function () {
    UserController::save();
});
$routes->post('/user/update', function () {
    UserController::update();
});
$routes->get('/user/:id', function ($id) {
    UserController::show($id);
});
$routes->get('/user/:id/edit', function ($id) {
    UserController::edit($id);
});
$routes->get('/user/:id/delete', function ($id) {
    UserController::delete($id);
});
$routes->get('/poll', function () {
    PollController::index();
});
$routes->get('/poll/new', function () {
    PollController::create();
});
$routes->post('/poll/save', function () {
    PollController::save();
});
$routes->post('/poll/update', function () {
    PollController::update();
});
$routes->get('/poll/:id', function ($id) {
    PollController::show($id);
开发者ID:pinjaliina,项目名称:aanestys,代码行数:31,代码来源:routes.php


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