本文整理汇总了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);
});
});
}
示例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) {
示例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();
示例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();