Make $user->update() to behave like $user->merge()

This commit is contained in:
Matias Griese
2019-01-21 21:00:58 +02:00
parent bd27d6fe8c
commit 2ada99d314

View File

@@ -191,16 +191,14 @@ class User extends Data
}
/**
* Replace all data
*
* WARNING: There are no checks! All the data will be replaced.
* Update object with data
*
* @param array $data
* @return $this
*/
public function update(array $data)
{
$this->items = $data;
$this->merge($data);
return $this;
}