當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。