[EXCEPTION][UI][UX] Add RedirectException, which can be thrown anywhere to redirect somewhere, and an exception handler

This commit is contained in:
Hugo Sales
2020-09-06 21:38:37 +00:00
committed by Hugo Sales
parent 420b4767b2
commit b906dde059
5 changed files with 74 additions and 21 deletions

View File

@@ -82,14 +82,16 @@ class Security extends Controller
}
$actor = GSActor::create(['nickname' => $data['nickname']]);
$user = LocalUser::create([
'nickname' => $data['nickname'],
'email' => $data['email'],
'password' => LocalUser::hashPassword($data['password']),
]);
DB::persist($user);
DB::persist($actor);
DB::flush();
$user = LocalUser::create([
'id' => $actor->getId(),
'nickname' => $data['nickname'],
'outgoing_email' => $data['email'],
'incoming_email' => $data['email'],
'password' => LocalUser::hashPassword($data['password']),
]);
DB::persist($user);
// generate a signed url and email it to the user
if (Common::config('site', 'use_email')) {