Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Models/UserIdentityModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,15 +542,15 @@ public function forceGlobalPasswordReset(): void
* Throws an Exception when it fails.
*
* @param array|int|string|null $id
* @param array|object|null $data
* @param array|object|null $row
*
* @return true if the update is successful
*
* @throws ValidationException
*/
public function update($id = null, $data = null): bool
public function update($id = null, $row = null): bool
{
$result = parent::update($id, $data);
$result = parent::update($id, $row);

$this->checkQueryReturn($result);

Expand Down
22 changes: 11 additions & 11 deletions src/Models/UserModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,18 @@ public function activate(User $user): void
* Override the BaseModel's `insert()` method.
* If you pass User object, also inserts Email Identity.
*
* @param array|User $data
* @param array|User $row
*
* @return int|string|true Insert ID if $returnID is true
*
* @throws ValidationException
*/
public function insert($data = null, bool $returnID = true)
public function insert($row = null, bool $returnID = true)
{
// Clone User object for not changing the passed object.
$this->tempUser = $data instanceof User ? clone $data : null;
$this->tempUser = $row instanceof User ? clone $row : null;

$result = parent::insert($data, $returnID);
$result = parent::insert($row, $returnID);

$this->checkQueryReturn($result);

Expand All @@ -274,20 +274,20 @@ public function insert($data = null, bool $returnID = true)
* If you pass User object, also updates Email Identity.
*
* @param array|int|string|null $id
* @param array|User $data
* @param array|User $row
*
* @return true if the update is successful
*
* @throws ValidationException
*/
public function update($id = null, $data = null): bool
public function update($id = null, $row = null): bool
{
// Clone User object for not changing the passed object.
$this->tempUser = $data instanceof User ? clone $data : null;
$this->tempUser = $row instanceof User ? clone $row : null;

try {
/** @throws DataException */
$result = parent::update($id, $data);
$result = parent::update($id, $row);
} catch (DataException $e) {
// When $data is an array.
if ($this->tempUser === null) {
Expand Down Expand Up @@ -316,15 +316,15 @@ public function update($id = null, $data = null): bool
* Override the BaseModel's `save()` method.
* If you pass User object, also updates Email Identity.
*
* @param array|User $data
* @param array|User $row
*
* @return true if the save is successful
*
* @throws ValidationException
*/
public function save($data): bool
public function save($row): bool
{
$result = parent::save($data);
$result = parent::save($row);

$this->checkQueryReturn($result);

Expand Down