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


PHP Members::update方法代码示例

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


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

示例1:

 /** @test */
 function it_should_update_the_information_of_a_registered_member()
 {
     $member = $this->members->with(Identifier::fromString('wxyz'));
     $member->transfer(Money::MXN(500), $this->existingMember);
     $this->members->update($this->existingMember);
     $this->assertBalanceAmounts(3500, $this->existingMember, "Current member balance should be 3500");
 }
开发者ID:zoek1,项目名称:php-testing-tools,代码行数:8,代码来源:MembersTest.php

示例2:

		$member['address'] = $_REQUEST['address'];
		$member['nic'] = $_REQUEST['nic'];
		$member['reg_no'] = $_REQUEST['reg_no'];
        $member['sex'] = $_REQUEST['sex'];
        $member['phone'] = $_REQUEST['phone'];
		$member['email'] = $_REQUEST['email'];
		$member['index_no'] = $_REQUEST['index_no'];
        // username, password are updated separately
		$member['username'] = 'Not Updated';
		$member['password'] = 'Not Updated';
		$member['login_type'] = $_REQUEST['login_type'];
        $member['category'] = $_REQUEST['category'];
        $member['barcode'] = 'Not Updated';
        $member['expired'] = $_REQUEST['expired'];

		$mem->update($member);
	}


	// Change Password /////////////////////////////////////////////////////
	if(isset($_REQUEST['BtnChangePassword'])){
        $member = $mem->getByID($_REQUEST['mid']);
        $password = $_REQUEST['pwd'];
        $mem->changePassword($member,$password);
	} //END: Change Password

	// Change Username /////////////////////////////////////////////////////
	if(isset($_REQUEST['BtnChangeUsername'])){
        $member = $mem->getByID($_REQUEST['mid']);
		$username = $_REQUEST['username'];
        $mem->changeUsername($member, $username);
开发者ID:nalaka,项目名称:pusthaka1,代码行数:31,代码来源:member_edit.php

示例3: updateAction

 public function updateAction($id = null)
 {
     $memberData = Members::findFirstById($id);
     if (!$memberData) {
         $this->flash->error('<button type="button" class="close" data-dismiss="alert">×</button>Invalid Member.');
         return;
     }
     if ($this->request->isPost()) {
         $member = new Members();
         $member->id = $id;
         if ($member->update($_POST)) {
             $this->flash->success('<button type="button" class="close" data-dismiss="alert">×</button>You profile has been updated.');
             return $this->response->redirect();
         }
     }
     $this->view->setVar('memberData', $memberData);
 }
开发者ID:hinjanobara,项目名称:mbimages,代码行数:17,代码来源:MemberController.php


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