You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quickstart.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -274,7 +274,7 @@ $user = new User([
274
274
'email' => 'foo.bar@example.com',
275
275
'password' => 'secret plain text password',
276
276
]);
277
-
$users->save($user);
277
+
$users->saveWithEmailIdentity($user);
278
278
279
279
// To get the complete user object with ID, we need to get from the database
280
280
$user = $users->findById($users->getInsertID());
@@ -296,7 +296,7 @@ NOTE: The User rows use [soft deletes](https://codeigniter.com/user_guide/models
296
296
297
297
### Editing A User
298
298
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::saveWithEmailIdentity()` method ensures that an email or password previously set on the `User` entity will be automatically updated in the correct `UserIdentity` record.
300
300
301
301
```php
302
302
$users = model('UserModel');
@@ -307,7 +307,7 @@ $user->fill([
307
307
'email' => 'joe.smith@example.com',
308
308
'password' => 'secret123'
309
309
]);
310
-
$users->save($user);
310
+
$users->saveWithEmailIdentity($user);
311
311
```
312
312
313
313
If you prefer to use the `update()` method then you will have to update the user's appropriate UserIdentity manually.
0 commit comments