Get the value of a custom user field
Berdir's answer gave me a search term that got me this:

$user = \Drupal\user\Entity\User::load(\Drupal::currentUser()-&gt;id());


After a bit of trial and error, this is the code that works, in case anyone else needs:

$user = \Drupal\user\Entity\User::load(\Drupal::currentUser()-&gt;id());
$r_period = $user-&gt;field_r_period_length_sec-&gt;value;


For multiple values, use

$r_period = $user-&gt;get('field_r_period_length_sec')-&gt;getValue();