Create a user account via API (programmatically)
Quick example :
What's the new way of achieving this going forward?
$create = $this->app->make(RegistrationService::class); $user = $create->create($data);
You can see the create method here:http://docs.mnkras.com/_registration_service_8php_source.html...
$userRegistrationService = \Core::make('\Concrete\Core\User\RegistrationServiceInterface'); ... $userinfo = [ 'uName' => $username, 'uEmail' => $email, 'uPassword' => $pass ]; $reg = $userRegistrationService->create($userinfo);
But your above code is much less ugly.