浏览代码

Upgrade forms.

mscherer 7 年之前
父节点
当前提交
a70a797536
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      docs/Behavior/Passwordable.md

+ 2 - 2
docs/Behavior/Passwordable.md

@@ -117,7 +117,7 @@ class UsersController extends Controller {
 			$options = [
 				'fieldList' => [...]
 			];
-			$user = $this->Users->patchEntity($user, $this->request->data, $options);
+			$user = $this->Users->patchEntity($user, $this->request->getData(), $options);
 			if ($this->Users->save($user)) {
 				// Update session data, as well
 				$this->Auth->setUser($user->toArray());
@@ -199,7 +199,7 @@ So you only need to pass in the other non-password-related fields:
 $options = [
 	'fieldList' => ['id', 'name']
 ];
-$user = $this->Users->patchEntity($user, $this->request->data, $options);
+$user = $this->Users->patchEntity($user, $this->request->getData(), $options);
 ```
 
 If the config `forceFieldList` is set to true, it will even create the fieldList for you on the fly.