public function register($name, $email, $password, $captcha) { // verify captcha if secret is available $secret = $this->config->getValue('recaptcha_secret'); if (!empty($secret)) { $this->verifyCaptcha($captcha, $secret); } $scopes = $this->getDefaultScopes(); $userId = $this->user->create(Table\User::STATUS_DISABLED, $name, $email, $password, $scopes); // send activation mail $this->sendActivationMail($userId, $name, $email); }
/** * Returns the POST response * * @param \PSX\Record\RecordInterface $record * @return array|\PSX\Record\RecordInterface */ protected function doPost($record) { $this->userService->create($record->status, $record->name, $record->email, $record->password, $record->scopes); return array('success' => true, 'message' => 'User successful created'); }