[SECURITY] Refactor

This commit is contained in:
Hugo Sales 2020-08-08 21:30:29 +00:00 committed by Hugo Sales
parent 6438092d86
commit 08e5b313ce
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

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