Can user UUID be null? I have a Drupal 7 site with a bunch of users. I want to migrate the users to Drupal 8 but not any of the content so I'm writing a crosswalk. Drupal 8 has uuid in the users table. Is there a way I can compute this or can I just set it to NULL? Thanks!
No, cannot be empty.
You can generate one with
$uuid_service = \Drupal::service('uuid');
$uuid = $uuid_service-&gt;generate();

If you use User::create it will automatically generate one for you.
Drupal\user\Entity\User::create([
  'uid' =&gt; $uid,
  'name' =&gt; '$user_name,
  'mail' =&gt; $email,
  'roles' =&gt; [],
  'pass' =&gt; [
    'value' =&gt; $hashed_drupal_7_password,
    'pre_hashed' =&gt; TRUE,
  ],
  'status' =&gt; 1,
])-&gt;save();


Rather than code it from scratch. The proper, Drupal way, to migrate is
using all of these:

core's migrate
migrate plus
migrate tools

I suggest your read this article A Quick Guide to Migrating Drupal Content from D7 to D8 which goes over how to migrate users and other scenarios.