.../user/src/Plugin/rest/resource/UserRegistrationResource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php b/core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php index 6a243c3..571b48a 100644 --- a/core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php +++ b/core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php @@ -100,6 +100,8 @@ public static function create(ContainerInterface $container, array $configuratio public function post(UserInterface $account = NULL) { $this->ensureAccountCanRegister($account); + $this->checkEditFieldAccess($account); + // Only activate new users if visitors are allowed to register and no email // verification required. if ($this->userSettings->get('register') == USER_REGISTER_VISITORS && !$this->userSettings->get('verify_mail')) { @@ -109,8 +111,6 @@ public function post(UserInterface $account = NULL) { $account->block(); } - $this->checkEditFieldAccess($account); - // Make sure that the user entity is valid (email and name are valid). $this->validate($account);