/** * @remotable */ public function update($a) { $password = ''; if (isset($a->items->password)) { $password = $a->items->password; } if (strlen($password) === 0) { unset($a->items->password); } $response = parent::update($a); if (strlen($password) > 0) { $response['items'][0]['password'] = $password; } return $response; }