Updating craft user fields from plugin
To Create a user do



$request = Craft::$app-&gt;getRequest();
$user = new User();
$user-&gt;username         = $request-&gt;getBodyParam('username');
$user-&gt;email            = $request-&gt;getBodyParam('email');
$user-&gt;newPassword      = $request-&gt;getBodyParam('password');
$user-&gt;firstName        = $request-&gt;getBodyParam('firstName');
$user-&gt;lastName         = $request-&gt;getBodyParam('firstName');
$user-&gt;setScenario(User::SCENARIO_REGISTRATION);
Craft::$app-&gt;getElements()-&gt;saveElement($user);


To update a user

$request            = Craft::$app-&gt;getRequest();
$user-&gt;username     = $request-&gt;getBodyParam('username');
$user-&gt;email        = $request-&gt;getBodyParam('email');
$user-&gt;newPassword  = $request-&gt;getBodyParam('password');
$user-&gt;firstName    = $request-&gt;getBodyParam('firstName');
$user-&gt;lastName     = $request-&gt;getBodyParam('firstName');
$user-&gt;setScenario(User::SCENARIO_LIVE);
Craft::$app-&gt;getElements()-&gt;saveElement($user);


So it's basically the same except the scenario