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


PHP UserController::update方法代码示例

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


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

示例1: testUpdate

 /**
  * Tests the update function in the UserController
  * @param  void
  * @return void
  */
 public function testUpdate()
 {
     // Update the User Types
     Input::replace($this->userData);
     $user = new UserController();
     $user->store();
     Input::replace($this->userDataUpdate);
     $user->update(1);
     $userUpdated = User::find(1);
     $this->assertEquals($userUpdated->email, $this->userDataUpdate['email']);
     $this->assertEquals($userUpdated->name, $this->userDataUpdate['full_name']);
     $this->assertEquals($userUpdated->gender, $this->userDataUpdate['gender']);
     $this->assertEquals($userUpdated->designation, $this->userDataUpdate['designation']);
 }
开发者ID:BaobabHealthTrust,项目名称:iBLIS,代码行数:19,代码来源:UserControllerTest.php

示例2: function

    SessionController::destroy();
});
$routes->get('/signup', function () {
    UserController::create();
});
$routes->post('/signup', function () {
    UserController::store();
});
$routes->get('/user', function () {
    UserController::index();
});
$routes->get('/user/:id', function ($id) {
    UserController::show($id);
});
$routes->post('/user/:id', function ($id) {
    UserController::update($id);
});
$routes->get('/user/:id/edit', function ($id) {
    UserController::edit($id);
});
$routes->get('/user/:id/destroy', function ($id) {
    UserController::destroy($id);
});
$routes->get('/group', function () {
    GroupController::index();
});
$routes->post('/group', function () {
    GroupController::store();
});
$routes->get('/group/new', function () {
    GroupController::create();
开发者ID:tuureilmarinen,项目名称:tsoha,代码行数:31,代码来源:routes.php

示例3: UserController

     break;
 case "logout":
     include_once "controllers/UserController.php";
     $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;
开发者ID:asancheza,项目名称:box,代码行数:31,代码来源:index.php

示例4: function

    UserController::logout();
});
$routes->get('/register/', function () {
    UserController::register();
});
$routes->post('/register/', function () {
    UserController::handle_register();
});
$routes->post('/user/:user_id/delete', function ($item_id) {
    UserController::destroy($item_id);
});
$routes->get('/user/:user_id/edit', function ($user_id) {
    UserController::edit($user_id);
});
$routes->post('/user/:user_id/edit', function ($user_id) {
    UserController::update($user_id);
});
// Vaatteen esittelysivu
$routes->get('/user/:item_id', function ($user_id) {
    UserController::show($user_id);
});
// Vaatteet
// Vaatteiden indeksisivu
$routes->get('/items/', function () {
    ItemController::index();
});
// Vaatteen lisäyssivu
$routes->get('/items/new', function () {
    ItemController::create();
});
// Vaatteen esittelysivu
开发者ID:juhapekkamoilanen,项目名称:Tsoha-Bootstrap,代码行数:31,代码来源:routes.php

示例5: array

<?php

//////// INITIALISE USER DB DATA ////////
//////// USER SETUP SETTINGS ////////
$stub = "noodlehuttullamarine";
$displayName = "Noodle Hut Tullamarine";
$address = nl2br("Shop 2/223 Melrose Dr\nTullamarine\nVIC 3043");
$phone = "(03) 9338 1392";
$hours = nl2br("Mon - Sat\n11am - 9:30pm\nSun\n4:30pm - 9pm");
$email = "fantasticmrdavid@gmail.com";
$language = "eng";
$adminLanguage = "eng";
$userData = array("username" => $stub, "password" => "abc123", "displayName" => $displayName, "address" => $address, "phone" => $phone, "hours" => $hours, "email" => $email, "status" => STATUS_ACTIVE);
if (SETUP_NEW_ACCOUNT) {
    $userController = new UserController(null, $userData);
    $userController->update();
}
开发者ID:fantasticmrdavid,项目名称:hospo,代码行数:17,代码来源:setup.php

示例6: autorizar

     UserController::nuevo();
     break;
 case 'POST | users':
     require 'controladores/users.php';
     autorizar();
     UserController::crear();
     break;
 case 'GET | users/editar':
     require 'controladores/users.php';
     autorizar();
     UserController::editar();
     break;
 case 'POST | user':
     require 'controladores/users.php';
     autorizar();
     UserController::update();
     break;
 case 'POST | user/delete':
     require 'controladores/users.php';
     autorizar();
     UserController::eliminar();
     break;
 case 'POST | user/promover':
     require 'controladores/users.php';
     autorizar();
     UserController::upgrade();
     break;
 case 'POST | user/degradar':
     require 'controladores/users.php';
     autorizar();
     UserController::downgrade();
开发者ID:arandaschimpf,项目名称:carrito,代码行数:31,代码来源:routes.php

示例7: array

<?php

$data = array("id" => $_POST['id'], "address" => $_POST['input_address'], "hours" => $_POST['input_hours'], "phone" => $_POST['input_phone'], "email" => $_POST['input_email'], "hours" => $_POST['input_hours']);
$userController = new UserController($data['id']);
if (!empty($_POST['input_password']) && $_POST['input_password'] == $_POST['input_passwordConfirm']) {
    $data['password'] = $_POST['input_password'];
}
if ($userController->update($data) === true) {
    echo "ok";
    exit;
} else {
    echo "saveError";
    exit;
}
echo "error";
exit;
开发者ID:fantasticmrdavid,项目名称:hospo,代码行数:16,代码来源:save.php

示例8: user

                 //                        print_r($_POST);
                 $u = new user($_POST['username'], $_POST['family'], $_POST['name'], $_POST['family'], $_POST['credit']['irr'], $_POST['credit']['eur'], $_POST['credit']['usd'], $_POST['credit']['aed'], $_POST['isadmin']);
                 $usr->add($u);
             }
         } else {
             $usr->_new();
         }
     } else {
         echo '<h1>Error  404  </h1>';
     }
     break;
 case 'update':
     if (isset($_SESSION['user']['isadmin']) && $_SESSION['user']['isadmin']) {
         if (isset($_POST['id'])) {
             $u = new user($_POST['username'], $_POST['family'], $_POST['name'], $_POST['family'], $_POST['credit']['irr'], $_POST['credit']['eur'], $_POST['credit']['usd'], $_POST['credit']['aed'], $_POST['isadmin']);
             $usr->update($_POST['id'], $u);
         } else {
             $usr->loadupdate($_GET['id']);
         }
     } else {
         echo '<h1>Error  404  </h1>';
     }
     break;
 case 'delete':
     if (isset($_SESSION['user']['isadmin']) && $_SESSION['user']['isadmin']) {
         if (isset($_GET['id'])) {
             $usr->Delete($_GET['id']);
         }
     } else {
         echo '<h1>Error  404  </h1>';
     }
开发者ID:jnaroogheh,项目名称:darvishi,代码行数:31,代码来源:index.php


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