| 1 | <?php |
||
| 16 | class User extends Entity |
||
| 17 | { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Fields that can be mass assigned using newEntity() or patchEntity(). |
||
| 21 | * |
||
| 22 | * Note that when '*' is set to true, this allows all unspecified fields to |
||
| 23 | * be mass assigned. For security purposes, it is advised to set '*' to false |
||
| 24 | * (or remove it), and explicitly make individual fields accessible as needed. |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $_accessible = [ |
||
| 29 | '*' => true, |
||
| 30 | 'id' => false |
||
| 31 | ]; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Fields that are excluded from JSON versions of the entity. |
||
| 35 | * |
||
| 36 | * @var array |
||
| 37 | */ |
||
| 38 | protected $_hidden = [ |
||
| 39 | 'password' |
||
| 40 | ]; |
||
| 41 | |||
| 42 | 2 | protected function _setPassword($password) |
|
| 46 | } |
||
| 47 |