aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Http
diff options
context:
space:
mode:
Diffstat (limited to 'app/Http')
-rw-r--r--app/Http/Controllers/Auth/RegisterController.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php
index fb7a4c1..a051071 100644
--- a/app/Http/Controllers/Auth/RegisterController.php
+++ b/app/Http/Controllers/Auth/RegisterController.php
@@ -63,10 +63,15 @@ class RegisterController extends Controller
*/
protected function create(array $data)
{
+ $hashedPassword = Hash::make($data['password']);
+ $previousHash = User::select('hash')->orderBy('id','desc')->first();
+ $summedHash = bcrypt($previousHash . $data['name'] . $data['email'] . 'password' . $hashedPassword);
+
return User::create([
'name' => $data['name'],
'email' => $data['email'],
- 'password' => Hash::make($data['password']),
+ 'password' => $hashedPassword,
+ 'hash' => $summedHash
]);
}
}