Split the flows for less code intendation
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
bdb40a2d11
commit
ab641685ed
|
|
@ -137,7 +137,8 @@ class RegisterController extends Controller {
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->mailService->sendTokenByMail($registration);
|
$this->mailService->sendTokenByMail($registration);
|
||||||
} catch (RegistrationException $e) {
|
} catch (RegistrationException $e) {
|
||||||
|
|
@ -151,7 +152,6 @@ class RegisterController extends Controller {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoCSRFRequired
|
* @NoCSRFRequired
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ class RegistrationService {
|
||||||
$registration->setEmail($email);
|
$registration->setEmail($email);
|
||||||
$registration->setUsername($username);
|
$registration->setUsername($username);
|
||||||
$registration->setDisplayname($displayname);
|
$registration->setDisplayname($displayname);
|
||||||
if ($password !== "") {
|
if ($password !== '') {
|
||||||
$password = $this->crypto->encrypt($password);
|
$password = $this->crypto->encrypt($password);
|
||||||
$registration->setPassword($password);
|
$registration->setPassword($password);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue