Fix #91
This commit is contained in:
parent
451bad1269
commit
706eda7b30
|
|
@ -135,7 +135,7 @@ class RegisterController extends Controller {
|
||||||
$registration = $this->registrationService->getRegistrationForToken($token);
|
$registration = $this->registrationService->getRegistrationForToken($token);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->registrationService->createAccount($registration, $username, $password);
|
$user = $this->registrationService->createAccount($registration, $username, $password);
|
||||||
} catch (RegistrationException $exception) {
|
} catch (RegistrationException $exception) {
|
||||||
return $this->renderError($exception->getMessage(), $exception->getHint());
|
return $this->renderError($exception->getMessage(), $exception->getHint());
|
||||||
} catch (\InvalidArgumentException $exception) {
|
} catch (\InvalidArgumentException $exception) {
|
||||||
|
|
@ -149,10 +149,7 @@ class RegisterController extends Controller {
|
||||||
], 'guest');
|
], 'guest');
|
||||||
}
|
}
|
||||||
|
|
||||||
return new TemplateResponse('registration', 'message',
|
return $this->registrationService->loginUser($user->getUID(), $username, $password, false);
|
||||||
['msg' => $this->l10n->t('Your account has been successfully created, you can <a href="%s">log in now</a>.', [$this->urlgenerator->getAbsoluteURL('/')])],
|
|
||||||
'guest'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderError($error, $hint="") {
|
private function renderError($error, $hint="") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue