public function EntityUser::getHighestId in Drupal 10
Same name and namespace in other branches
- 8 core/modules/user/src/Plugin/migrate/destination/EntityUser.php \Drupal\user\Plugin\migrate\destination\EntityUser::getHighestId()
- 9 core/modules/user/src/Plugin/migrate/destination/EntityUser.php \Drupal\user\Plugin\migrate\destination\EntityUser::getHighestId()
Returns the highest ID tracked by the implementing plugin.
Return value
int The highest ID.
Overrides EntityContentBase::getHighestId
File
- core/
modules/ user/ src/ Plugin/ migrate/ destination/ EntityUser.php, line 183
Class
- EntityUser
- Provides a destination plugin for migrating user entities.
Namespace
Drupal\user\Plugin\migrate\destinationCode
public function getHighestId() {
$highest_id = parent::getHighestId();
// Every Drupal site must have a user with UID of 1 and it's normal for
// migrations to overwrite this user.
if ($highest_id === 1) {
return 0;
}
return $highest_id;
}