Skip to content

Commit ed7ff5e

Browse files
committed
docs: update about UserModel::insert() and update()
1 parent 209d0b6 commit ed7ff5e

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

docs/quickstart.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ NOTE: The User rows use [soft deletes](https://codeigniter.com/user_guide/models
296296

297297
### Editing A User
298298

299-
The `UserModel::save()` method has been modified to ensure that an email or password previously set on the `User` entity will be automatically updated in the correct `UserIdentity` record.
299+
The `UserModel::save()`, `update()` and `insert()` methods have been modified to ensure that an email or password previously set on the `User` entity will be automatically updated in the correct `UserIdentity` record.
300300

301301
```php
302302
$users = model('UserModel');
@@ -309,21 +309,3 @@ $user->fill([
309309
]);
310310
$users->save($user);
311311
```
312-
313-
If you prefer to use the `update()` method then you will have to update the user's appropriate UserIdentity manually.
314-
315-
```php
316-
$users = model('UserModel');
317-
$user = $users->findById(123);
318-
319-
$user->fill([
320-
'username' => 'JoeSmith111',
321-
'email' => '[email protected]',
322-
'password' => 'secret123'
323-
]);
324-
325-
// Saves the username field
326-
$users->update($user);
327-
// Updates the email and password
328-
$user->saveEmailIdentity();
329-
```

0 commit comments

Comments
 (0)