[SECURITY] Refactor

This commit is contained in:
Hugo Sales 2020-08-08 21:30:29 +00:00 committed by Hugo Sales
parent d21d4f5cb1
commit 56c4309cb8
1 changed files with 2 additions and 2 deletions

View File

@ -81,8 +81,8 @@ class Security extends Controller
throw new \Exception(_m('Invalid nickname'));
}
$profile = new Profile($data['nickname']);
$user = new LocalUser($data['nickname'], $data['email'], $data['password']);
$profile = Profile::create(['nickname' => $data['nickname']]);
$user = LocalUser::create(['nickname' => $data['nickname'], 'email' => $data['email'], 'password' => $data['password']]);
DB::persist($user);
DB::persist($profile);