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


PHP UserController::updateUser方法代码示例

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


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

示例1: addRoutes

 static function addRoutes($app, $authenticateForRole)
 {
     //* /user/id - members can get their own profile
     $app->map("/user/get/:userId/", $authenticateForRole('member'), function ($userId) use($app) {
         UserController::selectUser($app, $userId);
     })->via('GET', 'POST');
     /*
      * id, nameFirst, nameLast, email, phone
      */
     $app->post("/user/update/:userId/", $authenticateForRole('member'), function ($userId) use($app) {
         UserController::updateUser($app, $userId);
     });
     //* /user/ routes - admin users only
     $app->group('/user', $authenticateForRole('admin'), function () use($app) {
         /*
          * nameFirst, nameLast, email, password
          */
         $app->post("/insert/", function () use($app) {
             UserController::insertUser($app);
         });
         /*
          * id
          */
         $app->map("/delete/:userId/", function ($userId) use($app) {
             UserController::deleteUser($app, $userId);
         })->via('DELETE', 'POST');
         /*
          * userId, groupId
          */
         $app->post("/unassign-group/", function () use($app) {
             UserController::unassignGroup($app);
         });
         /*
          * userId, groupId
          */
         $app->post("/assign-group/", function () use($app) {
             UserController::assignGroup($app);
         });
     });
 }
开发者ID:rachellcarbone,项目名称:angular-seed,代码行数:40,代码来源:user.routes.php

示例2: UserController

include_once SP_CTRLPATH . "/website.ctrl.php";
include_once SP_CTRLPATH . "/keyword.ctrl.php";
$controller = new UserController();
$controller->view->menu = 'users';
$controller->layout = 'ajax';
$controller->spTextPanel = $controller->getLanguageTexts('panel', $_SESSION['lang_code']);
$controller->set('spTextPanel', $controller->spTextPanel);
$controller->spTextUser = $controller->getLanguageTexts('user', $_SESSION['lang_code']);
$controller->set('spTextUser', $controller->spTextUser);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    switch ($_POST['sec']) {
        case "create":
            $controller->createUser($_POST);
            break;
        case "update":
            $controller->updateUser($_POST);
            break;
        case "updatemyprofile":
            $controller->updateMyProfile($_POST);
            break;
        case "activateall":
            if (!empty($_POST['ids'])) {
                foreach ($_POST['ids'] as $id) {
                    $controller->__changeStatus($id, 1);
                }
            }
            $controller->listUsers($_POST);
            break;
        case "inactivateall":
            if (!empty($_POST['ids'])) {
                foreach ($_POST['ids'] as $id) {
开发者ID:codegooglecom,项目名称:seopanel,代码行数:31,代码来源:users.php

示例3: function

    UserController::logout();
});
$routes->get('/users', function () {
    UserController::showUsers();
});
$routes->get('/user/:id', function ($id) {
    UserController::showUser($id);
});
$routes->post('/users/:id/destroy', function ($id) {
    UserController::destroyUser($id);
});
$routes->get('/users/:id/edit', function ($id) {
    UserController::editUser($id);
});
$routes->post('/users/:id/edit?', function ($id) {
    UserController::updateUser($id);
});
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/favorites', function () {
    UserController::showFavorites();
});
$routes->get('/drink', function () {
    DrinkController::index();
});
$routes->get('/drink/:id', function ($id) {
    DrinkController::show($id);
});
$routes->get('/addDrink', function () {
    DrinkController::addNew();
开发者ID:PauliNiva,项目名称:DrinkArchive,代码行数:31,代码来源:routes.php

示例4: UserController

             $serviceController->updateService();
             break;
         default:
             $serviceController->render();
             break;
     }
     break;
 case "users":
     $userController = new UserController();
     $where = $route[2];
     switch ($where) {
         case 'addNew':
             $userController->addNew();
             break;
         case 'updateRequestStatus':
             $userController->updateUser();
             break;
         default:
             $userController->render();
             break;
     }
     break;
 case "getInTouch":
     $getInTouchController = new GetInTouchController();
     $where = $route[2];
     switch ($where) {
         case 'updateGetInTouchStatus':
             $getInTouchController->updateGetInTouchStatus();
             break;
         default:
             $getInTouchController->render();
开发者ID:rajnishp,项目名称:bjsadmin,代码行数:31,代码来源:index.php


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